diff --git a/src/MainWindow.java b/src/MainWindow.java index d747cee..8a97378 100644 --- a/src/MainWindow.java +++ b/src/MainWindow.java @@ -8,6 +8,7 @@ import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JList; +import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextField; @@ -104,6 +105,16 @@ elementList = new List(); this.setVisible(true); + + // Show some help to run the commands. + JOptionPane.showMessageDialog(this, + "addElement(String): Use the text field. Use comma if you want to use (pos, elem).\n" + + "removeElement(int): Use the text field to remove the specific element.\n" + + "clearAllElements(): Use this to remove all elements.\n" + + "findElement(String): Use this to search for something in your list, it will go there.\n" + + "appendList(String[]): Use comma to separate all items to add.", + "Help", + JOptionPane.PLAIN_MESSAGE); } private class ButtonListener implements ActionListener {