By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,792 Members | 1,306 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,792 IT Pros & Developers. It's quick & easy.

I need help with javax.swing again... sorry

Blue1244
P: 39
I need help with javax swing again and I have this window where it will pop up but I need help with the drop down selection thing, how can I get it to where it will based on what I have selected open another window?
The picture of the window is an attachment.

But I need help if what I'm asking is impossible please tell me how I can get it to use the drop down button thing to work, sorry I'm new to this.
Attached Images
File Type: png window.PNG (18.2 KB, 92 views)
Sep 29 '13 #1

✓ answered by Nepomuk

It is possible, no doubt. First of all I'd read the ComboBox tutorial on oracla.com. This will show you a lot of what you need. Then check out the JComboBox API documentation. This shows you which methods are available when you have such a combobox; including getSelectedItem() and getSelectedIndex(). So, you can find out which item in the list is selected. Just continue after pressing the button depending on the selection in the list. :-)

Share this Question
Share on Google+
1 Reply


Nepomuk
Expert 2.5K+
P: 3,112
It is possible, no doubt. First of all I'd read the ComboBox tutorial on oracla.com. This will show you a lot of what you need. Then check out the JComboBox API documentation. This shows you which methods are available when you have such a combobox; including getSelectedItem() and getSelectedIndex(). So, you can find out which item in the list is selected. Just continue after pressing the button depending on the selection in the list. :-)
Sep 29 '13 #2

Post your reply

Sign in to post your reply or Sign up for a free account.