Search:

Type: Posts; User: Mr.777

Search: Search took 0.09 seconds.

  1. Replies
    9
    Views
    5,498

    Re: How to use multiple actionlisteners

    I will suggest you some things.
    1. Draw the GUI in constructor.
    2. And then add an actionevent to the button, you want to.
    3. Make an object of GUI class in your main and set it to visible.
  2. Replies
    9
    Views
    5,498

    Re: How to use multiple actionlisteners

    Well, it's saying you coz i guess you are drawing buttons in your main() method, am i right?
    If so, remember, main() is a static method and you can't reference the object from static context like...
  3. Replies
    9
    Views
    5,498

    Re: How to use multiple actionlisteners

    What does event.getSource() returns???
    Why don't you try casting it?
Results 1 to 3 of 3