-
Bug
-
Resolution: Unresolved
-
P4
-
6
-
x86
-
linux
Name: rmT116609 Date: 07/28/2004
FULL PRODUCT VERSION :
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux LX03239 2.4.21-226-default #1 Tue Jun 15 10:44:28 UTC 2004 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
If the setDefaultLookAndFeelDecorated(true) method has been called on JFrame and/or JDialog the resize becomes highly erratic. The symptoms are less severe when resized from the lower-right corner, but are most pronounced when re-sized with the upper-left corner. The window doesn't follow the mouse and will randomly change size as the mouse is moved. This problem is present on the Metal Look and Feel but I haven't tried it on any others.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a JFrame window after calling JFrame.setDefaultLookAndFeelDecorated(true). Then attempt to resize the window using the corners.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The window should resize smothly and the corner being used to resize should follow the mouse pointer.
ACTUAL -
The window resizes erratically.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.event.*;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.metal.*;
public class Bug281338 extends JFrame implements WindowListener
{
public Bug281338()
{
super();
setSize(300,300);
addWindowListener(this);
}
public static void main(String args[])
{
try
{
MetalLookAndFeel lnf = new MetalLookAndFeel();
UIManager.setLookAndFeel(lnf);
}
catch (UnsupportedLookAndFeelException ex)
{
ex.printStackTrace();
}
JFrame.setDefaultLookAndFeelDecorated(true);
JDialog.setDefaultLookAndFeelDecorated(true);
Bug281338 bug = new Bug281338();
bug.show();
}
public void windowClosed(WindowEvent e)
{
System.exit(0);
}
public void windowClosing(WindowEvent e)
{
dispose();
}
public void windowActivated(WindowEvent e){}
public void windowDeactivated(WindowEvent e){}
public void windowDeiconified(WindowEvent e){}
public void windowIconified(WindowEvent e){}
public void windowOpened(WindowEvent e){}
}
---------- END SOURCE ----------
(Incident Review ID: 281338)
======================================================================
FULL PRODUCT VERSION :
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux LX03239 2.4.21-226-default #1 Tue Jun 15 10:44:28 UTC 2004 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
If the setDefaultLookAndFeelDecorated(true) method has been called on JFrame and/or JDialog the resize becomes highly erratic. The symptoms are less severe when resized from the lower-right corner, but are most pronounced when re-sized with the upper-left corner. The window doesn't follow the mouse and will randomly change size as the mouse is moved. This problem is present on the Metal Look and Feel but I haven't tried it on any others.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a JFrame window after calling JFrame.setDefaultLookAndFeelDecorated(true). Then attempt to resize the window using the corners.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The window should resize smothly and the corner being used to resize should follow the mouse pointer.
ACTUAL -
The window resizes erratically.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.event.*;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.metal.*;
public class Bug281338 extends JFrame implements WindowListener
{
public Bug281338()
{
super();
setSize(300,300);
addWindowListener(this);
}
public static void main(String args[])
{
try
{
MetalLookAndFeel lnf = new MetalLookAndFeel();
UIManager.setLookAndFeel(lnf);
}
catch (UnsupportedLookAndFeelException ex)
{
ex.printStackTrace();
}
JFrame.setDefaultLookAndFeelDecorated(true);
JDialog.setDefaultLookAndFeelDecorated(true);
Bug281338 bug = new Bug281338();
bug.show();
}
public void windowClosed(WindowEvent e)
{
System.exit(0);
}
public void windowClosing(WindowEvent e)
{
dispose();
}
public void windowActivated(WindowEvent e){}
public void windowDeactivated(WindowEvent e){}
public void windowDeiconified(WindowEvent e){}
public void windowIconified(WindowEvent e){}
public void windowOpened(WindowEvent e){}
}
---------- END SOURCE ----------
(Incident Review ID: 281338)
======================================================================
- relates to
-
JDK-4962534 JFrame dances very badly
- Resolved
-
JDK-4955840 AWT components flicker on programmatic resize
- Closed