I'm really stumped on an assignment I have. Hopefully someone can help me out, it shouldn't take too long.
Many computer systems are connected to modems, telephones, and fax systems. As part of the programming team at WebPhone, you have been asked to design the user interface for a telephone keypad that displays on the screen. Figure 6-51 displays a sample of how the user interface of that application should look after programming is complete. I have attached a picture of Figure 6-51 so you can see what it looks like.
INSTRUCTIONS FROM THE BOOK, you may or may not need these, but i'm including them anyway:
1. Import Java's awt and [url removed, login to view] packages
2. Create a class called Telephone that extends the Frame and implements ActionListener
3. Declare public variables as follows: an array of buttons, a keypad, a TextField, a Label, a variable named foundKey
[url removed, login to view] a Telephone() constructor method and include the following:
a. Write a constructor for the TextField with a length of 20
b. a constructor to create the keypad Panel
c. a constructor to set the array to be of length 12
d. set the button's labels to match the nine buttons in Figure 6-51
e. set the TextField to be not editable
f. Type setBackground([url removed, login to view]) as background
g. type setLayout (new BorderLayout()); to declare the layout manager for the frame
h. Type [url removed, login to view](new GridLayout(4,3,10,10)); to declare the layout manager for the panel
i. Add the buttons to the keypad
j. Add the TextField to the North area of the frame
k. Add the Panel to the Center area of the frame
l. Add the Label to the South area of the frame.
6. Register a WindowListener
7. Create an actionPerformed event to include the following:
a. Write a loop to traverse the array. Test the member of the array at the index number to see if it matches the argument passed to the ActionListener event. Your code will look similar to if([url removed, login to view]() == keys[i]) although your variable names may differ
b. When a match is found, transfer the label from the button to the TextField, concatenating any previous entries. Your code will look similar to [url removed, login to view](lcd [url removed, login to view]() + keys[i].getLabel( ));
8. Create a main() method with the following code:
a. construct an instance of the Telephone.
b. set the bounds of the frame to 50, 130, 250, and 300.
c. Set the title of the frame to Telephone
d. set the viisibility of the frame to true.
9. Enter closing brackets
Thanks! Feel free to ask if you have any questions. Please include the .java and .class file :)
4 pekerja bebas membida secara purata $27 untuk pekerjaan ini
Hi, Its great that you are learning java. I'm ready to do your assignment for you as soon as you want it. Let me know when you are ready for it. I waiting to hear from you soon