home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / Documents / JAVA Programming / examples / 16 / CheckboxGroupDemo.java < prev    next >
Encoding:
Java Source  |  2000-09-08  |  722 b   |  22 lines

  1. /* <applet code = "CheckboxGroupDemo" width=120 height=100>
  2.    </applet>
  3. */ 
  4. import java.awt.*;
  5. import java.applet.*;
  6. public class CheckboxGroupDemo extends Applet {
  7. public void init() {
  8. setLayout(null);
  9. int width = Integer.parseInt(getParameter("width"));
  10. int height = Integer.parseInt(getParameter("height"));
  11. CheckboxGroup g = new CheckboxGroup();
  12. Checkbox win95 = new Checkbox("Windows 95/98", g, true);
  13. Checkbox solaris = new Checkbox("Solaris 2.5", g, false);
  14. Checkbox mac = new Checkbox("MacOS 7.5", g, false);
  15. add(win95);
  16. add(solaris);
  17. add(mac);
  18. win95.reshape(0, 0, width, height / 3);
  19. solaris. reshape(0, height / 3, width, height / 3);
  20. mac.reshape(0, 2 * height / 3, width, height / 3);
  21. } }
  22.