StyleOptionsPanel - /* / Author:...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************** // Author: Lewis/Loftus // // Demonstrates the use of check boxes. //******************************************************************** import javax.swing.*; import java.awt.*; import java.awt.event.*; public class StyleOptionsPanel extends JPanel { private final int WIDTH = 300; private final int HEIGHT = 100; private int fontSize = 36; private int style = Font.PLAIN; private JLabel saying; private JCheckBox bold, italic; private JPanel primary; private JRadioButton small, medium, large; //----------------------------------------------------------------- // Sets up a panel with a label and some check boxes that // control the style of the label's font. //----------------------------------------------------------------- public StyleOptionsPanel() { saying = new JLabel ("Say it with style!"); saying.setFont (new Font ("Helvetica", style, fontSize)); bold = new JCheckBox ("Bold"); bold.setBackground (Color.cyan);
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/22/2010 for the course CS 202 taught by Professor Fong during the Spring '10 term at SIU Carbondale.

Page1 / 3

StyleOptionsPanel - /* / Author:...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online