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

Why I can't take the string from JTextField?

 
Richard Phen
Ranch Hand
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code is showed below:

I type in some number and get a blank result: getSeatNumOnButnPan:
Why? Please help me solve it.
 
John Smith
Ranch Hand
Posts: 2937
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

protected JTextField seatTf = new JTextField(3);

That's because you used the wrong constructor for the filed. You probably meant:
protected JTextField seatTf = new JTextField("3");
JTextFiled(int value) means something else.
Eugene.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic