Adding to JList with Netbeans
Hello,
I am having a really difficult time trying to add a jTextField name and last name to the jList with netbeans, I know that for exit, I can create an action by right mouse clicking and creating an event. This is simple enough, however I have an add button that I am using and I have no idea how to code the add button with netbeans. Can someone please explain to me in detail how to do this.
I looked for tutorials on using netbeans to use the add button to add to a jlist and I found nothing. if someone could give me the instructions on how to do this, or show me the page for netbeans that shows the steps in netbeans to do this I would really appreciate it. Thank you.
Adding to JList with Netbeans
Ok, I don't really understand where this defaultlistmodel goes, and
THere is a JList constructor that has a parameter ListModel...
I read about this but I keep forgetting what constructors are and a parameter?
do I do something like this
public class defaultlist {
public void defaultListModel() {
listmodel.setjlist1.(jTextField1)
listmodel.setjlist1.(jTextField2)
}
}
and then in the add button actionperformed event
do this
new defaultListModel();
Re: Adding to JList with Netbeans
I searched forever for this!!! Thank you kewlgeye!!!