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...
Type: Posts; User: javapenguin
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...
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...
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....
So I set it to four?
So really, what do I do?
8-|
t is a text field, not a variable.
What do you mean by "give it a value"?
Give what a value?
The button has a text.
Ok, it's not carrying over. Should I change it to 3 handlers?
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.
What was scope again? I forgot.
Do I have to assign it coordinates or something?
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...