Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3782
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Applet won't display. |
| Message-ID | <c3a287ec-92eb-4b49-8a09-598dfc8bc6d3@d45g2000hsc.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <31993393-6715-40d9-bfe8-3350f4a95a76@m36g20 |
| Date | 2011-04-27 15:46 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui On Jul 17, 12:39 am, "Paul.Lee.1...@gmail.com" <Paul.Lee. 1...@googlemail.com> wrote: ... > This is probably very simple, ... It probably is. So this time I will try working with a code snippet. If my suggestions do not fix the stated problem, try posting an SSCCE. > ... > Derived from JApplet, my init() method has the following: > > Container content=getContentPane(); content.setLayout(new FlowLayout()) > > display = new JPanel(); > controls = new JPanel(); > > displayPanel = new DataDisplayPanel( this ); > displayPanel.setPreferredSize(new Dimension( 840, 712 )); > displayPanel.setBackground( Color.BLACK ); > > display.add( displayPanel ); > > content.add( display ); > content.add( controls ); pack() ... > ... Someone on > another forum suggested to another poster that a .pack() call was > missing, but I have run JApplets without this call, and they work just > fine. That would largely be by accident. -- Andrew Thompson http://pscode.org/ --- * 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 | Find similar | Unroll thread
Re: Applet won't display. "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:46 +0000
csiph-web