Here is the Java code.
- import java.applet.Applet;
- import java.awt.Checkbox;
- import java.awt.Color;
- public class Demo extends Applet {
- public void init() {
-
- Checkbox checkBox1 = new Checkbox();
-
- checkBox1.setLabel("Java");
- Checkbox checkbox2 = new Checkbox("C#");
- Checkbox checkbox3 = new Checkbox("C++");
-
- add(checkBox1);
- add(checkbox2);
- add(checkbox3);
-
- setBackground(Color.cyan);
- }
- }
Thank you, keep learning and sharing.