Re: opening a window from an applet..



On Mon, 29 Aug 2005 10:41:14 -0400, Frances <fdr58@xxxxxxxxx> wrote or
quoted :

>when you open a window from an applet (I mean JApplet) does that window
>also have to be an applet? if not then what? JFrame?

It might be a Window, Dialog, Frame, JFrame ... Only Applets have
init methods. The others have constructors and addNotify methods.
see http://mindprod.com/jgloss/addnotify.html

Basically you create the Window, set its size, validate() if it has
its own layout, setVisible( true ), then do a setVisible( false ) to
temporarily hide it or dispose() to get rid of it entirely.


Look at the code in any of my Applets that has an About button. A
window pops up when you click it.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
.


Quantcast