Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #1205
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: how to execute the co |
| Message-ID | <1174089883.316319.58520@l77g2000hsb.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <1174078035.627269.51440@n76g2000hsh.googlegroups.com> |
| Date | 2011-04-27 15:31 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui On Mar 17, 7:47 am, "Daniel Pitts" <googlegrou...@coloraura.com> wrote: > On Mar 16, 12:44 pm, "lrantisi" <lrant...@gmail.com> wrote: > > > the paintComponenet method is the method we use to put the code that > > does the drawing, but how do I execute this code. > > How to let the code of the paintComponenet method be executed. ???? > > Thanks > > When you have created a visible window (JFrame, or JApplet), you can > create a class which extends JComponent and overrides paintComponent. JApplet (quite inconsistently) has no paintComponent(). OTOH - I feel 'paint' should neve be overridden in root level containers. As soon as the paintComponent() of a JFrame is customised, management realises they actually want this as an applet, or in a floating JOptionPane/JDialog. If the custom painting is done in a JPanel, OTOH, the component can be dropped into whatever other container is needed. Andrew T. --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
how to execute the code o "lrantisi" <lrantisi@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
Re: how to execute the co "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
Re: how to execute the co "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
Re: how to execute the co "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
Re: how to execute the co "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
csiph-web