• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

how to re_ layout?

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My problem is that when some action happens, I want to re_layout the panel, but how to implement it?
my code is like this:
...
JButton buttonTemp;
contentPane=this.getPanel();
...
public void ActionPerformed(Event e)
{
//...
//re_layout the panel,
//for example, to add a button
contentPane.add(buttonTemp);
//...
}
But it could not work? I mean the butten could not been showed out
so how could I do?
Thank you first.
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
u must use validate,or updateUI refresh your UI.
 
I wasn't selected to go to mars. This tiny ad got in ahead of me:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic