I have written the following code to handle an event incase a Jinternalframe is minimized or maximized.
jif.addComponentListener(new ComponentListener() {
public void componentResized(ComponentEvent e) {
Boolean isMax = ((JInternalFrame)e.getComponent()).isMaximum();
if(isMax == false)
{
// TODO Auto-generated method stub
}
else if(isMax == true )
{
// TODO Auto-generated method stub
}
}
public void componentMoved(ComponentEvent e) {
// TODO Auto-generated method stub
}
public void componentShown(ComponentEvent e) {
// TODO Auto-generated method stub
}
public void componentHidden(ComponentEvent e) {
// TODO Auto-generated method stub
}
}
);
The problem is that the isMax part gets triggered when the frame loads. I want this event to happen only after the Jinternalframe is completely loaded. Also i have noticed this event triggers when i minimize the container applet.
Is there any workaround for this?
You might be able to use a
PropertyChangeListenerandInternalFrameListener: