Search:

Type: Posts; User: javapenguin

Search: Search took 0.08 seconds.

  1. Replies
    19
    Views
    3,641

    Re: ACTION LISTENER HANDLING

    Wait never mind, I fixed it, the program code that'll work is:


    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import...
  2. Replies
    19
    Views
    3,641

    Re: ACTION LISTENER HANDLING

    Well, I made a new textfield called t in the actionPerformed, and the stupdi exception problem went away, though it won't go change text in text field. Now I know that somehow it isn't recognizing...
  3. Replies
    19
    Views
    3,641

    Re: ACTION LISTENER HANDLING

    It is a text field.

    private JTextField t;

    Constructor
    {

    t = new JTextField(15);
    t.setText("5"); // in case that was the cause, not having it set to anything, but it doesn't appear to be....
  4. Replies
    19
    Views
    3,641

    Re: ACTION LISTENER HANDLING

    So I set it to four?

    So really, what do I do?

    8-|
  5. Replies
    19
    Views
    3,641

    Re: ACTION LISTENER HANDLING

    t is a text field, not a variable.
  6. Replies
    19
    Views
    3,641

    Re: ACTION LISTENER HANDLING

    What do you mean by "give it a value"?

    Give what a value?

    The button has a text.
  7. Replies
    19
    Views
    3,641

    Re: ACTION LISTENER HANDLING

    Ok, it's not carrying over. Should I change it to 3 handlers?
  8. Replies
    19
    Views
    3,641

    Re: ACTION LISTENER HANDLING

    I think scope is whether or not Java has access to something, or can find it at least.

    Why isn't it finding it?

    I'm baffled.
  9. Replies
    19
    Views
    3,641

    Re: ACTION LISTENER HANDLING

    What was scope again? I forgot.

    Do I have to assign it coordinates or something?
  10. Replies
    19
    Views
    3,641

    Re: ACTION LISTENER HANDLING

    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import...
Results 1 to 10 of 10