🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #1760

Getting out of static mode

#1760
From: Craig Wilson
Date: Tue, 15 Jul 2003 19:40
15 lines
1704 bytes
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?

Craig
Technical Details
Message-ID: <3f145858@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-05!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,5097939110998c9d,start
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2003-07-15 12:44:13 PST
From: "Craig Wilson" <cwilson@got.net>
Newsgroups: borland.public.jbuilder.java.swing
Subject: Getting out of static mode
Date: Tue, 15 Jul 2003 12:40:14 -0700
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 64.125.88.10
Message-ID: <3f145858@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1058297944 64.125.88.10 (15 Jul 2003 12:39:04 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-05!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail