Article View: borland.public.jbuilder.java.swing
Article #9482Re: Set background after extending JPanel?
From: James Cook
Date: Mon, 27 Mar 2000 00:00
Date: Mon, 27 Mar 2000 00:00
23 lines
1436 bytes
1436 bytes
Be sure to setOpaque(true) jim Trey Ethridge <ethridge@softrealityinc.com> wrote in message news:38DF8772.DE6AFEF6@softrealityinc.com... > Hello all, > > I'm trying to use the Graphics2D api to draw some simple shapes on a > class that I extended from JPanel. I'm want to set the background in my > object, but I have been unable to get it to work. I've tried using > super.setBackground(Color.white) from within my class. > > I have overloaded the paintComponent() method in my class and I don't > know if that has anything to do with it. I know that when I comment out > the paintComponent() method it paints the background correctly. > However, it's my understanding that I have to overload the > paintComponent() method to draw my shapes with the Graphics2D api. > > Can anyone help me with this? > > Trey >
Technical Details
Message-ID:
<38dfa154.0@news.dot.state.oh.us>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38DF8772.DE6AFEF6@softrealityinc.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,e8ac0b4dbbc13ca5 X-Google-Attributes: gid111d45,public From: "James Cook" <jimcook.spaminator@remove.for.spam.iname.com> Subject: Re: Set background after extending JPanel? Date: 2000/03/27 Message-ID: <38dfa154.0@news.dot.state.oh.us> X-Deja-AN: 603037661 References: <38DF8772.DE6AFEF6@softrealityinc.com> X-Trace: 27 Mar 2000 12:58:44 -0500, dotfw001-dmz.dot.state.oh.us X-MSMail-Priority: Normal X-Priority: 3 Newsgroups: borland.public.jbuilder.java.swing X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300