StyleGUI - /* / Author: Lewis/Loftus / /...

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

View Full Document Right Arrow Icon
//******************************************************************** // Author: Lewis/Loftus // // Solution to Programming Project 9.4 // // Represents the user interface for the StyleOptions program. //******************************************************************** / import javax.swing.*; import java.awt.*; import java.awt.event.*; i public class StyleGUI { private final int WIDTH = 300, HEIGHT = 110, FONT_SIZE = 36; private JLabel saying; private JCheckBox bold, italic; private JPanel primary; //----------------------------------------------------------------- // Sets up a panel with a label and some check boxes that // control the style of the label's font. Uses a split pane //----------------------------------------------------------------- public StyleGUI() { saying = new JLabel ("Say it with style!"); saying.setFont (new Font ("Helvetica", Font.PLAIN, FONT_SIZE)); bold = new JCheckBox ("Bold"); bold.setBackground (Color.cyan); bold.setToolTipText("Check here to make the text bold");
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 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

Page1 / 2

StyleGUI - /* / Author: Lewis/Loftus / /...

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