Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

basic java problem

Status
Not open for further replies.

badbhoy

Programmer
Apr 11, 2002
12
GB
hi i new to java and have a few problems
1. how can u move the cursor from one textfield to another by using the return?

2. i have a method getTime() in a class called Datarecorder. and need to use it in my GUI class. i want to put it into a textfield and make it non editable. how do i do this>?

3. and how can i have a button on my GUI to print the contents of the display area!!!

thanx
 
the method is from the class datarecorder and need the time to be displayed into a txtfield in another class

public String getTime()
{
String astring;
GregorianCalendar now = new GregorianCalendar();

astring = "time just now is " + now.getCalendar.HOUR_OF_DAY)
+ ":" + now.get(Calendar.MINUTE);
if(now.get(Calendar.MINUTE) < 10)
astring = &quot;time just now is &quot; + now.getCalendar.HOUR_OF_DAY)
+ &quot;:&quot; + &quot;0&quot; +now.get(Calendar.MINUTE);

return astring;

}

i need to put it into a textfield in another class call DRGui and make it non editable

thanx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top