posted 22 years ago
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.