-
Bug
-
Resolution: Fixed
-
P1
-
1.3.0
-
rc3
-
x86
-
windows_nt
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2032885 | 1.4.0 | Brent Christian | P1 | Resolved | Fixed | beta |
Name: pa48320 Date: 03/22/2000
When a Choice is placed in a container with a layout mananger and the container is moved or resized, the choice moves outside the container.
Consider the following code. When the mouse is clicked in the frame, the choice moves down. It should have only moved right by 10 pixels.
This is possibly a regression of 4130788 and is very important to us
public class choiceTest
extends java.awt.Frame
implements java.awt.event.WindowListener, java.awt.event.MouseListener
{
public static void main(String[] args)
{
choiceTest t = new choiceTest("choiceTest");
t.setSize(400,600);
t.setLayout(null);
java.awt.Container c = new java.awt.Container();
t.add(c);
c.setSize(200,200);
c.setLocation(100,100);
java.awt.Choice ch = new java.awt.Choice();
c.setLayout(new java.awt.BorderLayout());
ch.setSize(100,27);
c.add(ch, "South");
t.addWindowListener(t);
t.addMouseListener(t);
t.setVisible(true);
}
public choiceTest(String title)
{
super(title);
}
//Defined in java.awt.event.WindowListener
public void windowOpened(java.awt.event.WindowEvent p0 )
{
}
//Defined in java.awt.event.WindowListener
public void windowClosing(java.awt.event.WindowEvent p0 )
{
dispose();
}
//Defined in java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent p0 )
{
System.exit(0);
}
//Defined in java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent p0 )
{
}
//Defined in java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent p0 )
{
}
//Defined in java.awt.event.WindowListener
public void windowActivated(java.awt.event.WindowEvent p0 )
{
}
//Defined in java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent p0 )
{
}
//Defined in java.awt.event.MouseListener
public void mouseClicked(java.awt.event.MouseEvent p0 )
{
}
//Defined in java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent p0 )
{
java.awt.Component c = getComponent(0);
c.setLocation(110,100);
}
//Defined in java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent p0 )
{
}
//Defined in java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent p0 )
{
}
//Defined in java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent p0 )
{
}
}
(Review ID: 102741)
======================================================================
- backported by
-
JDK-2032885 java.awt.Choice moves incorrectly when in a container with a layout manager
-
- Resolved
-
- relates to
-
JDK-4327789 Regression test Choice/SetFontTest failing
-
- Resolved
-
-
JDK-4326154 Choice placed inconsistently across Solaris, Win32
-
- Resolved
-
-
JDK-4255631 Solaris: Size returned by Choice.getSize() does not match actual size
-
- Closed
-