Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.gui Subject: Re: How do I paint on an existing Panel? Date: Fri, 17 Feb 2012 10:45:36 -0800 (PST) Organization: http://groups.google.com Lines: 46 Message-ID: <7306414.1263.1329504337003.JavaMail.geo-discussion-forums@pbai10> References: <4f16f997$0$2957$fa0fcedb@news.zen.co.uk> <4f3d6f9c$0$2500$da0feed9@news.zen.co.uk> <800725.801.1329427684213.JavaMail.geo-discussion-forums@pbbpk4> <4f3e9a6d$0$2485$db0fefd9@news.zen.co.uk> NNTP-Posting-Host: 173.164.137.214 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1329504457 17110 127.0.0.1 (17 Feb 2012 18:47:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 17 Feb 2012 18:47:37 +0000 (UTC) In-Reply-To: <4f3e9a6d$0$2485$db0fefd9@news.zen.co.uk> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.164.137.214; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true X-Received-Bytes: 2929 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:5036 "A B" wrote: > Lew wrote: > > Note that you did not start the GUI on the Event Dispatch Thread (EDT). I > > don't > > know if this causes your problem, but it's a mistake. > > I'm sure it is. What is an EDT and what do you do with it? As you quoted from my post, it's the "Event Dispatch Thread", as explained in the Swing tutorial. Have you read the tutorials? Also, GIYF, dude! > >> I've chopped the code back to just the bits directly involved with the > >> drawing and sprinkled debugging statements everywhere, which established > >> that the bit that calls paintComponent() (via repaint() - that's right > >> isn't > >> it?) is firing but paintComponent() itself isn't. Here's what's left, if > >> you're interested. Sorry if anyone finds it hard to read, I don't know > >> how > >> you like it formatted. > > > > We like it formatted according to the well-established Java Coding > > Conventions > > or a slight variation thereof. > > Look I've admitted over and over again that I'm a complete newbie, there's > no need to keep taking me up on it like this. No, I DON'T know what the > accepted conventions are unless you tell me. I'm getting a proper Java > book, but it hasn't come yet. You don't need to wait, just use your Internet connection When you fail to do the most elementary research or learn the most basic things, we take it up with you. It's called "advice". Instead of getting all defensive, man up and take the advice. It will help you. Sheesh. -- Lew