I need to know how to add a JTextField if one of the JComboBox options is selected, and if the other one is selected I don't want to have that text field there any more.
I want to create a combobox and a textbox.And user will enter a text into the textbox, and the text will be added as an item of combobox.. How can I do it? I wrote a code, but I couldn't find what will I write in actionlistener.
The following is an example to add items on runtime on a JComboBox in Java:Exampleimport java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.a ...
Post a Comment:
Showing 0 Comments: