NumericKeyPad -...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: //******************************************************************** // Authors: Lewis and Loftus // // Solution to Programming Project 9.6 //******************************************************************** import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.border.*; public class NumericKeyPad extends JFrame { JPanel keyPanel; JPanel clearPanel; JLabel displayLabel; String displayText; //----------------------------------------------------------------- // Sets up the GUI for the keypad //----------------------------------------------------------------- public NumericKeyPad() { super("Numeric Keypad"); setSize(250,250); // make the frame closeable setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); displayText = ""; // initialize the display displayLabel = new JLabel(" "); displayLabel.setBackground(Color.white); displayLabel.setBorder(new BevelBorder(BevelBorder.LOWERED)); getContentPane().add(displayLabel, BorderLayout.NORTH); // create the panel to hold the keys keyPanel = new JPanel(); keyPanel.setLayout(new GridLayout(4,3));keyPanel....
View Full 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 / 3

NumericKeyPad -...

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