🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #19973

Simple question about static references

#19973
From: Chris Clayton
Date: Sun, 09 Nov 1997 00:00
23 lines
1397 bytes
Well, here I am again, with another simple question.  (At
least, I hope its simple.  No one else seems to have posted
this, so it *has* to be something obvious that I'm doing wrong.)

I am writing an application, and I've generated the UI just
fine.  I created a new Panel class derived from BevelPanel,
and wrote the appropriate paint() routine.  A number of the
variables in that routine are defined in the DemoFrame1 class
generated by JBuilder from the Design view.  I qualified
them each time I used them as DemoFrame1.WindowSize
(as an example).  When I build, however, each of these
variables gets an error:  cannot make a static reference to
non-static variable WindowSize.

Now, WindowSize is non-static because it exists in an
instance of DemoFrame1.  But when PaintPanel is
instantiated in the DemoFrame1 constructor, it isn't
a static class either.  Can anyone help me figure out
why I'm getting this error?  Many thanks!

--
Chris Clayton       clayton@rust.net
Technical Details
Message-ID: <3465537D.BD4987A9@rust.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,802d223961fbc908,start
X-Google-Attributes: gidf74b3,public
From: Chris Clayton <clayton@rust.net>
Subject: Simple question about static references
Date: 1997/11/09
Message-ID: <3465537D.BD4987A9@rust.net>
X-Deja-AN: 288025066
Organization: None
Reply-To: clayton@rust.net
Newsgroups: borland.public.jbuilder.java.language