File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Setting to the default element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Setting to the default element" Watch "Setting to the default element" New topic
Author

Setting to the default element

Pradeep Kadambar
Ranch Hand

Joined: Oct 18, 2004
Posts: 148
If the user enters a emty string then set the combo selection to the string that was previously selected.

Please give a way out of this problem.
Rachel Swailes
Ranch Hand

Joined: May 18, 2004
Posts: 434
You can test the length of the string or see if the string is all space characters, or use trim to remove white space and then test the length. If the string is in one of these conditions, then don't add it to the box.

Cheers,
Rachel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting to the default element
 
Similar Threads
date format with MS Access database
Tech Word Game
ResultSet to Array
WA #1.....word association
How to convert byte array into string array?