jQuery in Action, 2nd edition
The moose likes Swing / AWT / SWT and the fly likes regarding combobox in frame Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "regarding combobox in frame" Watch "regarding combobox in frame" New topic
Author

regarding combobox in frame

sam sawant
Greenhorn

Joined: Mar 26, 2009
Posts: 12
i have 2 comboboxes
when i click on any item of combo box,other combobox values should change.
for eg
in 1st combobox values are(a,b,c)
if i select a
it shud display 1,2,3 in another combobox
sameways for b & c shud display something else

plzz help me
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 8436

We don't just hand out ready made solutions here at the Ranch.
Tell us what you have tried to do and what problems you are facing and we will help you finding a solution.

Also please use real words.
http://faq.javaranch.com/java/UseRealWords

[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
simplest way is to change combo2's model when combo1's selection changes
sam sawant
Greenhorn

Joined: Mar 26, 2009
Posts: 12
whats the syntax to change combobox model?
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> whats the syntax to change combobox model?

comboBox.setModel(...)

(your question indicates you should read sun's comboBox tutorial)
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: regarding combobox in frame
 
Similar Threads
HTML
control one JComboBox from another
combobox ,how to get it from Table
Reg ComboBoxes
how to add dropdownlistbox to text field