No of visitors who read this post: 187
Category: JavaScript
Type: Question
No votes yet

 I know a little about programming but I have to create a program of an information based check box. If the information is positive the check box will show √ sign and if negative it will show ×.Dear Java experts can you tell me how can I do that in java script?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

#

Using the code below you can learn how to create check box in Java Swing. Check boxes can be created with swing by creating instance of JCheckBox class using constructor.

It contains the string which has to be shown beside the check box on the frame.

Import javax.swing.*;

public class create checkbox{

public static void main (String[] args{

JFrame frame = new JFrame (“Check Box Frame”);

JCheckBox chk = new JCheckBox (“This is the Check Box”);

frame.add (chk);

frame.setSize (350, 350);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.setVisible(true);

}

}

Hope you will be able to create a check box using Java.

Regards,

Charlio Sanhy.