GrandWelcomeFinal

GrandWelcomeFinal - /Welcome program with check boxes,...

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

View Full Document Right Arrow Icon
//Welcome program with check boxes, radio buttons, and combo box / import java.awt.*; import java.awt.event.*; import javax.swing.*; i public class GrandWelcomeFinal extends JApplet implements ItemListener { private int intBold = Font.PLAIN; private int intItalic = Font.PLAIN; private Color currentColor = Color.black; private String currentFontName ="Courier"; private JCheckBox boldCB, italicCB; private JRadioButton redRB, greenRB, blueRB; private ButtonGroup ColorSelectBGroup; private JComboBox fontFaceDD; private String[] fontNames = {"Dialog", "Century Gothic", "Courier", "Serif"}; public void init() { Container c = getContentPane(); c.setLayout(null); boldCB = new JCheckBox("Bold"); italicCB = new JCheckBox("Italic"); redRB = new JRadioButton("Red"); greenRB = new JRadioButton("Green"); blueRB = new JRadioButton("Blue"); fontFaceDD = new JComboBox(fontNames); fontFaceDD.setMaximumRowCount(3); boldCB.setSize(80, 30); italicCB.setSize(80, 30); redRB.setSize(80, 30); greenRB.setSize(80, 30);
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.

Page1 / 2

GrandWelcomeFinal - /Welcome program with check boxes,...

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