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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!