-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
beta
-
x86
-
windows_xp
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2116921 | 5.0u3 | Mike Bronson | P3 | Closed | Won't Fix |
Name: rmT116609 Date: 04/22/2004
FULL PRODUCT VERSION :
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows XP
A DESCRIPTION OF THE PROBLEM :
In Windows look and feel, when a JInternal Frame is maximized, and then minimized using the minimize button, the next JInternal Frame (if it is Maximizable) will be maximized.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Steps for reproducing this bug.
1) Run the following test code.
2) Maximize frame 2 using maximize button.
3) Minimize frame 2 using minimize button.
4) Frame 1 will now be maximized.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class TestMdi
{
public TestMdi()
{
JFrame frame = new JFrame("MDI Test Frame");
JDesktopPane desktopPane = new JDesktopPane();
desktopPane.setPreferredSize(new Dimension(400, 300));
desktopPane.setBackground(Color.GREEN);
frame.add(desktopPane, BorderLayout.CENTER);
frame.pack();
frame.setSize(1000,800);
frame.setVisible(true);
JInternalFrame iFrame1 = new JInternalFrame("Child 1 ", true, true, true, true);
desktopPane.add(iFrame1);
desktopPane.getDesktopManager().setBoundsForFrame(iFrame1, 0, 0, 200, 300);
iFrame1.setVisible(true);
JInternalFrame iFrame2 = new JInternalFrame("Child 2 ", true, true, true, true);
desktopPane.add(iFrame2);
desktopPane.getDesktopManager().setBoundsForFrame(iFrame2, 200, 0, 200, 300);
iFrame2.setVisible(true);
}
public static void main(String[] args)
{
try
{
String className = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
UIManager.setLookAndFeel(className);
}
catch (Exception e)
{
e.printStackTrace();
}
TestMdi frame = new TestMdi();
}
}
I believe this is due to changes made in the WindowsDesktopManager activateFrame method. The method works correctly when a frame is closed, but it should not maximize the next frame when a frame is minimized.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
When a frame is maximized and then minimized, the next frame should NOT be maximized.
ACTUAL -
With two JInternal frames open and at their normal bounds. Frame 2 was maximized and then minimized. Frame 1 became maximized.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class TestMdi
{
public TestMdi()
{
JFrame frame = new JFrame("MDI Test Frame");
JDesktopPane desktopPane = new JDesktopPane();
desktopPane.setPreferredSize(new Dimension(400, 300));
desktopPane.setBackground(Color.GREEN);
frame.add(desktopPane, BorderLayout.CENTER);
frame.pack();
frame.setSize(1000,800);
frame.setVisible(true);
JInternalFrame iFrame1 = new JInternalFrame("Child 1 ", true, true, true, true);
desktopPane.add(iFrame1);
desktopPane.getDesktopManager().setBoundsForFrame(iFrame1, 0, 0, 200, 300);
iFrame1.setVisible(true);
JInternalFrame iFrame2 = new JInternalFrame("Child 2 ", true, true, true, true);
desktopPane.add(iFrame2);
desktopPane.getDesktopManager().setBoundsForFrame(iFrame2, 200, 0, 200, 300);
iFrame2.setVisible(true);
}
public static void main(String[] args)
{
try
{
String className = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
UIManager.setLookAndFeel(className);
}
catch (Exception e)
{
e.printStackTrace();
}
TestMdi frame = new TestMdi();
}
}
---------- END SOURCE ----------
(Incident Review ID: 255176)
======================================================================
FULL PRODUCT VERSION :
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows XP
A DESCRIPTION OF THE PROBLEM :
In Windows look and feel, when a JInternal Frame is maximized, and then minimized using the minimize button, the next JInternal Frame (if it is Maximizable) will be maximized.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Steps for reproducing this bug.
1) Run the following test code.
2) Maximize frame 2 using maximize button.
3) Minimize frame 2 using minimize button.
4) Frame 1 will now be maximized.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class TestMdi
{
public TestMdi()
{
JFrame frame = new JFrame("MDI Test Frame");
JDesktopPane desktopPane = new JDesktopPane();
desktopPane.setPreferredSize(new Dimension(400, 300));
desktopPane.setBackground(Color.GREEN);
frame.add(desktopPane, BorderLayout.CENTER);
frame.pack();
frame.setSize(1000,800);
frame.setVisible(true);
JInternalFrame iFrame1 = new JInternalFrame("Child 1 ", true, true, true, true);
desktopPane.add(iFrame1);
desktopPane.getDesktopManager().setBoundsForFrame(iFrame1, 0, 0, 200, 300);
iFrame1.setVisible(true);
JInternalFrame iFrame2 = new JInternalFrame("Child 2 ", true, true, true, true);
desktopPane.add(iFrame2);
desktopPane.getDesktopManager().setBoundsForFrame(iFrame2, 200, 0, 200, 300);
iFrame2.setVisible(true);
}
public static void main(String[] args)
{
try
{
String className = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
UIManager.setLookAndFeel(className);
}
catch (Exception e)
{
e.printStackTrace();
}
TestMdi frame = new TestMdi();
}
}
I believe this is due to changes made in the WindowsDesktopManager activateFrame method. The method works correctly when a frame is closed, but it should not maximize the next frame when a frame is minimized.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
When a frame is maximized and then minimized, the next frame should NOT be maximized.
ACTUAL -
With two JInternal frames open and at their normal bounds. Frame 2 was maximized and then minimized. Frame 1 became maximized.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class TestMdi
{
public TestMdi()
{
JFrame frame = new JFrame("MDI Test Frame");
JDesktopPane desktopPane = new JDesktopPane();
desktopPane.setPreferredSize(new Dimension(400, 300));
desktopPane.setBackground(Color.GREEN);
frame.add(desktopPane, BorderLayout.CENTER);
frame.pack();
frame.setSize(1000,800);
frame.setVisible(true);
JInternalFrame iFrame1 = new JInternalFrame("Child 1 ", true, true, true, true);
desktopPane.add(iFrame1);
desktopPane.getDesktopManager().setBoundsForFrame(iFrame1, 0, 0, 200, 300);
iFrame1.setVisible(true);
JInternalFrame iFrame2 = new JInternalFrame("Child 2 ", true, true, true, true);
desktopPane.add(iFrame2);
desktopPane.getDesktopManager().setBoundsForFrame(iFrame2, 200, 0, 200, 300);
iFrame2.setVisible(true);
}
public static void main(String[] args)
{
try
{
String className = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
UIManager.setLookAndFeel(className);
}
catch (Exception e)
{
e.printStackTrace();
}
TestMdi frame = new TestMdi();
}
}
---------- END SOURCE ----------
(Incident Review ID: 255176)
======================================================================
- backported by
-
JDK-2116921 Windows L&F: Minimizing a maximized JIF causes the next frame to Maximize
-
- Closed
-
- relates to
-
JDK-6681958 Maximization state of JInternalFrames is corrupted by WindowsDesktopManager
-
- Open
-