My intention is that when I click enter in the jTextfield the content String goes to the JLIST. I view several codes with jlist.addElement, but my Netbeans doesn't recognize that. The Jtextfield is : TickNuevo That string is: String ticket = TickNuevo
The ListDemo is a working example that shows you how to both "add" and "remove" items from a JList. It will also show you how to better structure your code so the GUI is created on the Event Dispatch Thread (EDT).
How to populate list above from the textfields? Firstly, create the GUI using your preferred IDE (i used netbeans). Next, add these method from actionPerformed event called from addButton and removeButton private void btnAddActionPerformed(java.awt.event.
Post a Comment:
Showing 0 Comments: