Link to home
Start Free TrialLog in
Avatar of dshrenik
dshrenikFlag for United States of America

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!
Avatar of for_yan
for_yan
Flag of United States of America image


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
But even better select tab directly and do not deopned on JComboBox
Avatar of dshrenik

ASKER

I can. But I have recieved specific instruction not to use a JTabbedPane.

ASKER CERTIFIED SOLUTION
Avatar of for_yan
for_yan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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