Search:

Type: Posts; User: copeg

Search: Search took 0.09 seconds.

  1. Replies
    7
    Views
    854

    Re: Changing Panel Color with a ComboBox

    You did already by implementing the action listener. Google the term anonymous class and you will see many explanations. My recommendation above might be better illustrated with the following:

    ...
  2. Replies
    7
    Views
    854

    Re: Changing Panel Color with a ComboBox

    Add some println's in there to see the values of the variables...in particular, the listener object when you try to add the listener will be null. You must first instantiate it (create the anonymous...
  3. Replies
    7
    Views
    854

    Re: Changing Panel Color with a ComboBox

    You need a semicolon at the end of the anonymous class definition (my code above did not reflect this - edited)
  4. Replies
    7
    Views
    854

    Re: Changing Panel Color with a ComboBox

    The code you posted does not appear to implement a listener. It defines a listener, but never implements the actionPerformed method, which is required. Recommend you read through the following links:...
Results 1 to 4 of 4