Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

regarding JTextField  RSS feed

 
kalyan chowdary
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am developing search screen in swings,

i am having 6 fields in search creteria,

Whether i enter one field and click search button action is performed,

but i want to check the fileds whether it is null or not,

How it is in swings,

help me,

Thanks in advance.
 
Nick Meverden
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
String enteredText = yourtextField.getText();

then use anything String equals to test what your looking for.

example: if (enteredText.equals("")) {}

or you can get fancy using java.util.regex
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!