Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Eclipse Program created above refers to the textbook project that has to be completed. I was not given the code for this. The code
Java Eclipse "Program created above" refers to the textbook project that has to be completed. I was not given the code for this. The code has to be written. First thing you should do, open the file called NumerickeypadTester from Files/Assignment Datafiles and copy it into the program you created above (i.e. you will overwrite it). Do the same for the file called Numerickeypadpanel. For this program, you are to turn in only the source codes. You will copy it into the folder called Assignment06, thus your Assignment06 folder will contain two documents for this assignment. Finally, submit the NumerickeypadTester and NumerickeypadPanel java files via Canvas for this assignment. Design and implement a program that displays a numeric keypad that might appear on a phone. Above the keypad buttons, show a label that displays the numbers as they are picked. To the right of the keypad buttons, include another button to clear the display. Use a border layout to manage the overall presentation, and a grid lay- out to manage the keypad buttons. Put a border around the keypad buttons to group them visually, and a border around the display. import java.awt. Import java.awt.event. import javax.swing." import javax.swing.border. pub ise 19 baxder. public class NumericKeypad Panel extends JPanel // declare variables/controls to // be used in program private JPanel key Panel, clear Panel: private JLabel displayLabel: public NumerickeypadPanel() 11 set type of border to // be used (BoderLayout) // create the panel to hold the keys // use a GridLayout of 4,3 key Panel = new JPanel(); create the buttons and add to the key Panel // and associate their respective listeners // buttons will be o thru 9. *. // and a clear button JButton buttoni, button2, button 3; JButton button 4, buttons, button6; JButton button, buttons, button 9; JButton buttono, buttonast, buttonPnd; JButton buttonC; KeyListener displaykey - new KeyListener(); // ada panel in the Center // set up size of panel } // end constructor NumericKeypadPanel private class KeyListener implements ActionListene public void action Performed (ActionEvent event) // display number // end class Keylistener private class ClearListener implements ActionListener public void actionPerformed (ActionEvent event) // clear display ) // end class ClearListener 7/ end class Numerickeypad Panel // for GUI programming import javax.swing.JFrame; public class NumerickeypadTester public static void main (String() args) // create a frame and add pane to it and // make it visible } // end method main end class NumericKeypadTester
Java Eclipse
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started