You should compare Strings with the .equals method. The ActionEvent.getActionCommand() method returns a String. So, in your actionPerformed() method of your ButtonHandler, instead of saying:...
Type: Posts; User: aussiemcgr
You should compare Strings with the .equals method. The ActionEvent.getActionCommand() method returns a String. So, in your actionPerformed() method of your ButtonHandler, instead of saying:...
You don't need an array for this, since you are merely counting. You should have 3 ints that are accessible by the entire CookieJarJPanel class. One int will represent the number of cookies in the...