posted 23 years ago
Hi,
I need to display a panel when I click on the menuitem of a frame(myFrame). I am using setVisible(true). It works.... but :
The problem is that the panel doesn't get displayed unless I resize myFrame with the mouse.
Similarly, when I click on another menuitem on the frame, the existing panel should disappear and another panel should appear.
I am using myFrame.remove(panel1) and then myFrame.add(panel2) and setVisible property of panel2 set to true.
It again works, but only after I resize the parent frame.
Can anyone tell me why the changes don't appear instantly on the click, and what to do to remediate this ??
Ashu