Win a copy of Kotlin in Action this week in the Kotlin forum!
    Bookmark Topic Watch Topic
  • New Topic

.transferFocus()  RSS feed

 
Candy Bortniker
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Report post to moderator
I need to write an if statement that will transfer focus from one textfield to the next. I have a statement that will transfer focus from the first to the second but not the second to the third. How do I say in java language:
if (GrpAcctNumber has focus)
ssn.transferFocus();
else
name.transferFocus();
this is what I have now:

code:
--------------------------------------------------------------------------------
public void enterPressed ( LimitedTextEvent evt ){SSN.transferFocus ();System.out.println ( "Good Limited Text Entered" ); }
--------------------------------------------------------------------------------
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Report post to moderator
Just to be clear, are you creating an AWT- or Swing-based GUI of some sort, or is this to do with a web application and web pages?
If it's AWT- or Swing-based, let's continue the conversation over in the Swing / JFC / AWT forum.
If it's a web page, then the HTML / JavaScript forum might be appropriate, as might be the Servlet forum, the JSP forum, or perhaps even the frameworks forum.
[ March 14, 2004: Message edited by: Dirk Schreckmann ]
 
Candy Bortniker
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Report post to moderator
I posted this question to the swing-awt board and no one replied.
 
Dirk Schreckmann
Sheriff
Posts: 7023
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!