Search:

Type: Posts; User: Norm

Search: Search took 0.30 seconds.

  1. Replies
    5
    Views
    1,198

    Re: How do you add two actionListeners (in a GUI)?

    Glad you got it working.
  2. Replies
    5
    Views
    1,198

    Re: How do you add two actionListeners (in a GUI)?

    The normal contents for a class that implements ActionListener is the actionPerformed() method. Nothing more.
    Create an instance of that class and use that in the addListener() method.
  3. Replies
    5
    Views
    1,198

    Re: How do you add two actionListeners (in a GUI)?

    Several ways to do it:
    1) Create an anonymous class for each button
    2) The object that created the ActionEvent has a reference in the object. In the class's actionPerformed() method call the...
Results 1 to 3 of 3