Question: Following program has two check boxes on a JFrame. One with the label C++ and the other one with Java. Java check box is checked.
Following program has two check boxes on a JFrame. One with the label "C++" and the other one with "Java". Java check box is checked. Write codes to show this effect (it will be an incomplete program and its fine).
import javax.swing.*;
public class CheckBoxExample {
CheckBoxExample() {
JFrame f= new JFrame("CheckBox Example");
//Create the two check boxes and their dimensions.
//Write code to make the check boxes work do you have to do next with these check boxes?
//And finally
public static void main(String args[]) {
new CheckBoxExample(); }
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
