• Post Reply Bookmark Topic Watch Topic
  • New Topic

get typed value of combobox  RSS feed

 
Tai Yo
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a GUI that includes comboboxes and textfields. After entering value to them it will be saved in text file.
For example, in one panel I have 2 comboboxes and 2 textfields.
By this code I am getting entered value from combobox.


When I enter values to all comboboxes and textfields, in output text file I can get typed values.
But the problem I am facing is when I type value only to 1st combobox and other fields left empty, then output text file is also empty.
I cannot understand what is wrong with combobox.
Any help is really appreciated.
 
Tony Docherty
Bartender
Posts: 3264
81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We will need to see all your code to determine why it isn't working in the situation you have described.


What is this test supposed to achieve?
If you are getting a substring from index 0 to 5 it can't possibly equal a zero length string.
 
Campbell Ritchie
Sheriff
Posts: 55351
157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But there is a bang sign in that expression, so it will evaluate to a true regardless.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!