![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Dec 2004
Posts: 2
Rep Power: 0
![]() |
Hi, i'm new to programming, I have just started it in my gr 11 computer engineering class and we are using Ready to program with java and I d/l Netbeans but the syntax is quite different and I was wondering if anyone could help me with how to use field widths and how to input from the keyboard? Thanks for any help recieved, it would be greatly appreciated.
MM |
|
|
|
|
|
#2 |
|
Programmer
Join Date: Nov 2004
Posts: 84
Rep Power: 4
![]() |
I have had a long last week, so my remaining two brain cells are hanging on for dear life...forgive me if I have totally misunderstood you.
What do you mean the syntax is different?? Do you mean textfield widths like a JTextField?? JTextfield jt = new JTextFiled(20); <-- where 20 would be the size of your text field. Is that what you mean? To input your text, you click in the textfield and type :unsure: Could you clarify your questions a bit more??
__________________
HijackThis Team-SFDC |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Dec 2004
Posts: 2
Rep Power: 0
![]() |
what i meant is for example using Ready to program with Java how i would write a field width is
c.println("Hello", 20);the 20 meaning it puts the word in the quotations on the 20th space as for inputting from the keyboard int age;
age = 0;
c.println("Enter your age:");
age = c.readInt();
or
c.println("Enter your age:");
int age = c.readInt();I hope this is clearer and hope you can help me, thanks |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|