Results 1 to 3 of 3
Thread: quick choises in JoptionPane
- 02-03-2009, 03:05 PM #1
Member
- Join Date
- Dec 2008
- Posts
- 99
- Rep Power
- 0
quick choises in JoptionPane
Hey everybody
I'm using joptionPane for chosing from list.
The problem is that is too demanding - when the dialog is opened , first i have to press the arrow that show the list possibilities, then chose my option , and then - confirm with ok.
How can I speed things up - - so the list will automaticly apears and removing the need for confirm ?
Java Code:String s = (String)JOptionPane.showInputDialog( parent1, "Chose From the list", "Customized Dialog", JOptionPane.PLAIN_MESSAGE, null, listText, listText[0]);
- 02-03-2009, 05:19 PM #2
The short answer, as far as I know, is "no".
Some Swing components are very good about allowing you to type the first letter of the option, and the list will shift to that point. I believe JComboBox does that, which is part of JOptionPane. Also, JTree allows you to type several letters, and it will continue positioning the list to the specific list entry that starts with those letters.
All I can suggest is to try out typing characters...
- 02-04-2009, 02:34 AM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Yes, this is not possible with input dialogs. As Steve says, JComboBox do that. Search the forum, you can find the quite similar example coded by hardwired.
Similar Threads
-
Need help quick!
By Manikyr in forum New To JavaReplies: 11Last Post: 01-28-2009, 04:08 AM -
One last quick question
By jigglywiggly in forum New To JavaReplies: 7Last Post: 01-26-2009, 08:53 AM -
Quick Question
By Graeme in forum New To JavaReplies: 4Last Post: 01-08-2009, 08:01 PM -
Quick Question
By Spenc in forum New To JavaReplies: 3Last Post: 09-22-2008, 02:26 PM -
Quick Help Please! Can't Run Code!!
By VinceGuad in forum EclipseReplies: 4Last Post: 01-16-2008, 03:54 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks