Getting out of static mode

2003-07-16 03:40:14 AM
I've developed a fairly large Java program and started work on it at the
same time I was learning Java a few months ago. In the program constructor
I simply create and show my main frame. Turns out that every time I try
calling certain functions from anywhere in the program, I get "non-static
method cannot be referenced from a static context." The current problem is
that I would like to give a method several tries to read a file, with a
wait() in between, but JBuilder won't let me call the non-static wait() from
a static context.
I still am not completely clear on the static/non-static concept, but wonder
if there's a way to get out of this rut. Is it that calling my frame from
the program constructor made that frame static? Is it just me, or is this a
common situation?