• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to re_ layout?

 
Porky Liu
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • 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.
 
kim jungil
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u must use validate,or updateUI refresh your UI.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!