Hi there, I have a rather silly question, however its got the better of me!
This is simple example of the work I'm doing:
I have a variable:
public
String varname;
and it stores some text.
How do i reference that variable in another form? For example, I have a label in a seperate form.
JLabel mylabel = new JLabel();
How do I get it to display the text from the variable (varname) in the other form
mylabel.setText(varname);
^^ This doesn't work. How do i reference the variable correctly?
Help much appreciated
Nick