ColorOptionsPanel

ColorOptionsPanel - ColorOptionsPanel.java Represents the...

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

View Full Document Right Arrow Icon
// ************************************************************************* // ColorOptionsPanel.java // // Represents the user interface for the ColorOptions program that lets // the user change background color by selecting a radio button. // ************************************************************************* import javax.swing.*; import java.awt.*; import java.awt.event.*; public class ColorOptionsPanel extends JPanel { private final int WIDTH = 350, HEIGHT = 100, FONT_SIZE = 20; private final int NUM_COLORS = 5; private JPanel primary; private Color [] color = new Color[NUM_COLORS]; private JRadioButton [] colorButton = new JRadioButton[NUM_COLORS]; private JLabel heading; // ------------------------------------------------------------------ // Sets up a panel with a label at the top and a set of radio buttons // that control the background color of the panel. // ------------------------------------------------------------------ public ColorOptionsPanel () {
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 / 2

ColorOptionsPanel - ColorOptionsPanel.java Represents the...

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