Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Java (http://www.programmingforums.org/forum17.html)
-   -   Please Help, New To Programming (http://www.programmingforums.org/showthread.php?t=1416)

muska666 Dec 4th, 2004 12:51 PM

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

groovicus Dec 5th, 2004 8:07 PM

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??

muska666 Dec 5th, 2004 8:53 PM

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


All times are GMT -5. The time now is 3:28 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC