dshrenik
asked on
JComboBox
I am planning to implement the following:
I will have a JComboBox with a list of items. Depending on the item selected, I want to display a JPanel inside a JPanel.
If possible, please provide some sample code. Thanks!
I will have a JComboBox with a list of items. Depending on the item selected, I want to display a JPanel inside a JPanel.
If possible, please provide some sample code. Thanks!
But even better select tab directly and do not deopned on JComboBox
ASKER
I can. But I have recieved specific instruction not to use a JTabbedPane.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Waht is the difference between your JPanel views?
You can of course add and remove components on JPanel - but that usually causes some pain - I'm alwaays trying to avoid it
and create ans show all components in constructor, then change their properties in the events
and create ans show all components in constructor, then change their properties in the events
What is JPanel insde JPanel?
I'd rather use JTabbedPane for that
in the acitonPerformed method slected
the tab which you want depebnding in selected item