Search:

Type: Posts; User: kyasuleyman

Search: Search took 0.13 seconds.

  1. Replies
    10
    Views
    2,171

    Re: Help with event handling - beginner

    Well as you saw i eventually figured it out. But i need to know how i can use different events:


    button.addActionListener(new ActionListener(){ //EVENT HANDLER

    public void...
  2. Replies
    10
    Views
    2,171

    Re: Help with event handling - beginner

    Believe me, i've read all of that, to no avail!

    Thanks for your help.
  3. Replies
    10
    Views
    2,171

    Re: Help with event handling - beginner

    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
    public class Menu extends JFrame {
    private ImageIcon image; //variables
    ...
  4. Replies
    10
    Views
    2,171

    Re: Help with event handling - beginner

    I have read this already but failed to understand it. I figured the best way to learn how to implement handlers in practice is by seeing an example of my code with an event handler.

    For example i...
  5. Replies
    10
    Views
    2,171

    Help with event handling - beginner

    This is my code, i am construction a GUI straight from code:


    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
    public class...
Results 1 to 5 of 5