*
The moose likes Applets and the fly likes Add a component dynamically at runtime to an applet ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Add a component dynamically at runtime to an applet ??" Watch "Add a component dynamically at runtime to an applet ??" New topic
Author

Add a component dynamically at runtime to an applet ??

felicitas
Greenhorn

Joined: Sep 05, 2000
Posts: 3
Hi,
how to add a Component (Label ...) dynamically at runtime to an applet ? I've tried various possibilities, but I haven't had any success.
Thanks, Felicitas
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I guess your are trying to added components when an event ocuurs. this should be more or less the same way you add components to the Applet. Make sure that you have a specific layout and components are not overlapped.
felicitas
Greenhorn

Joined: Sep 05, 2000
Posts: 3
Hi,
if I do so, I don't see my added components. I only see them, after clicking the 'restart' button in the AppletViewer.
... what's the matter ??
Stephanie Grasson
Ranch Hand

Joined: Jun 14, 2000
Posts: 347
felicitas,
I think the reason you are not seeing the new Label is you are not updating the Applet correctly. Maybe the example below will help.


Stephanie
 
Don't get me started about those stupid light bulbs.
 
subject: Add a component dynamically at runtime to an applet ??
 
Similar Threads
Servlet to applet communication
Add Component (Label ...) dynamically at runtime to an applet ?
jsf panelGrid
Components
File & dynamic retrieval