-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.1.6
-
generic
-
generic
Name: mf23781 Date: 06/23/98
When using JInternalFrames placed in a JDesktopPane,
maximizing the frame,then minimize the frame, then
maximizing the frame, then restoring the frame doesn't
restore the internal frame. The restore button changes to a
maximise button as it should do if the JInternalFrame was being
restored to its minimised state, but the JInternalFrame remains
in the maximised state.
When using JInternalFrames placed in a JDesktopPane, minimizing the frame, followed by maximizing, followed by minimizing, followed by maximizing causes the frame to disappear.
Source code follows:
import java.awt.*;
import com.sun.java.swing.*;
public class minmax
{
public static void main(String args[])
{
try
{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (Exception e)
{
}
// build the main window
JFrame frame = new JFrame();
frame.setSize(new Dimension(600, 400));
JDesktopPane desktop = new JDesktopPane();
JPanel mainPanel = new JPanel();
mainPanel.setLayout(new BorderLayout());
mainPanel.add(BorderLayout.CENTER,desktop);
frame.setContentPane(mainPanel);
frame.setTitle("desktop");
frame.show();
frame.validate();
frame.repaint();
// build some jinternal frames
JInternalFrame win1 = new JInternalFrame("win1", true, true, true, true);
win1.setBounds(new Rectangle(0, 0, 100, 100));
JInternalFrame win2 = new JInternalFrame("win2", true, true, true, true);
win2.setBounds(new Rectangle(0, 0, 100, 100));
desktop.add(win1, desktop.DEFAULT_LAYER);
desktop.add(win2, desktop.DEFAULT_LAYER);
}
}
NB. This is the same test case as the one in bug 4150568 and
may be related.
======================================================================
- duplicates
-
JDK-4424247 DefaultDesktopManager does not handle InternalFrame state changes as expected.
-
- Resolved
-
- relates to
-
JDK-4346483 Maximized JInternalFrame does not maintain state after iconified.
-
- Closed
-