I am doing a GUI assignment for my introductory computer science course at my University, and I ran into IDEA’s UI Designer. I figured out how to customize the UI itself, but now I am running into trouble configuring the listeners.
Here is my code so far:
public class test
private JPanel panel1;
private JList list1;
private ListModel aModel;
private JTextField textField1;
private JButton addButton;
private JButton removeButton;
aModel = list1.getModel();
public void mouseClicked(MouseEvent e)
//aModel.addElement (String<textField1>); <<This is where I want to add the text inside textField1
* Invoked when an action occurs.
public void actionPerformed(ActionEvent e)
//This just needs to keep track of the current text and then send it to the Addbutton listener if it is clicked.
What my course has said so far is that you need to make a special nested class to “handle” all events that occur in the GUI. But what the GUI designer does is just provide a method which overrides the specific event which I’m dealing with.
Can anyone direct me to some kind of documentation on this (ideally intended for beginners like me) that explains the process of making a functional GUI with listeners achieved through the IDEA GUI Designer?