I am having trouble figuring out how to do this program. I am so lost I was
wondering if you could show me how to do it step by step so I know what I a
supoust to do in the future....
import java's awt and awt.event packages......i know how to do that import
java.awt.*; and so on.....
Create a class named Checkerboard that extends frame and implements
actionlistener.....
i think i know how to do this....
public class Checkerboard extends frame implements ActionListener
{
am i right so far......
an array of 16 textfields......I think I know how to do this but Can u show
me how....
lcdField = new TextField(16);
A panel to hold the array......know this one.....
keyPad = new Panel();
three individual TextFields. Not sure of what they want me to do..Can u
show me what im supoust to do.....
three int variables to receive the start, stop, and step data......
have no idea of hwo to even start it......
two button clear and go........Know how to do this...
Button GoButton = new Button("Go");
Button ClearButton = new Button("Clear");
am I right......
a Panel to hold the three fields and two buttons. Can u show me how to do
this one....
create a classnamed Checkerboard....
public class Checkerboard
am I right.........
Construct each of the components declared above and set the start stop and
step variables to zero..... can u show me how to do this.....
Set the frame layout manager to BorderLayout......not quite sure of how to do
this...
write a loop to traverse the array and set each of the 16 textfields in that
array so they cannot be edited. within the same loop set each textfield text
to match the loop incriments.seteditabel and settext methods... Can u show
me how to do this....
add the componets to their respective panels. Not quite sure of what they
are asking me can u show me so i know in the future...
use the addActionListener to enliven the two buttons
place the panels in the frame using the appropriate area. Can u show me this
one to..
convert the data from the input fields to ints, using the get text method
along with the parseint method. store the results in the variable declared
for that pupose in the third step.... this just confuses me....
write a loop that goes through the array setting every background color to
magenta. Not quite sure of how to do this...
write a loop based on the user input values. EACH TIME THE LOOP IS INITITED
CHANGE THE BACKLGROUND TO YELLOW....
THANK FOR YOUR HELP BAILEY...
am I right.......
Stephen Marjoribanks - 20 Mar 2006 19:13 GMT
> an array of 16 textfields......I think I know how to do this but Can u show
> me how....
> lcdField = new TextField(16);
>
> A panel to hold the array......know this one.....
> keyPad = new Panel();
If you can't yet successfully do this I think you need to learn it first
before asking for help! Creating an array really is a simple task yet
you have done it wrong. I don't think you'll get much help having shown
such little effort to learn it.
Steve
Oliver Wong - 20 Mar 2006 23:07 GMT
>I am having trouble figuring out how to do this program. I am so lost I
>was
[quoted text clipped - 18 lines]
> me how....
> lcdField = new TextField(16);
I won't go so far as to claim that you have made "very little effort",
but I must admit you don't seem to be ready to handle this task, when you
haven't mastered the basics yet. Try to get an introductory book on Java
programming, or read through http://java.sun.com/docs/books/tutorial/
- Oliver