Non static variable cannot be referenced from a static context.

Caporegime
Joined
12 Mar 2004
Posts
29,962
Location
England
I'm creating a program with a gui using the netbeans gui builder, I want to get a text field to display a variable from another class when a button is pressed, I type in the code after selecting the actionperformed option in events exactly where the ide tells me to, however I keep getting this error message.
 
What exactly do you want to know? The error message tells you the problem.
 
Can you post your code?

It sounds to me that you are trying to get the value of a variable from an object that you don't have a reference to.
 
Back
Top Bottom