Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Add a component dynamically at runtime to an applet ??

 
felicitas
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 347
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic