Search:

Type: Posts; User: kyasuleyman

Search: Search took 0.44 seconds.

  1. Replies
    10
    Views
    1,023

    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
    1,023

    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
    1,023

    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
    1,023

    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
    1,023

    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...
  6. Replies
    1
    Views
    436

    Label preferred size problem

    I am trying to set the width and height of my image (which is actually just a label with an icon) as the same as the width and height of my screen so that it can cover the entire frame.

    My code...
Results 1 to 6 of 6