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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started