How do you allow an action to be performed when a user selects a specific item on a Choice() component?

For example:
If a user selects a specific item on the Choice() component, I want a JTextField() to be set to .setVisible(true) and appear.

Anyone?

Add an ItemListener?

addItemListener is already there

... then in that listener just setVisible(true) for the JTextField - or am I missing the point of this question???

Thanks! I didn't know that in the listener method itself you can do that. That did the trick!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.