-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
1.1.3
-
generic
-
generic
ingrid.yao@Eng 1997-07-30
If Window.toFront() is called in WindowListener.windowActivated() to activate
a different window, the other window is brought to the top but is not activated.
From the test case included below, shouldn't be able to activate Frame 1.
When Frame 1 is activated, toFront() is called on Frame 2, which should
activate Frame 2 and bring it to the top.
test case:
===========================================================================
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class ToFront
extends Applet
implements WindowListener
{
private Frame _mFrame1;
private Frame _mFrame2;
public ToFront()
{
}
public void start ()
{
_mFrame1 = new Frame("frame 1");
_mFrame2 = new Frame("frame 2");
_mFrame1.setBounds(100, 100, 300, 200);
_mFrame1.setBounds(125, 125, 300, 200);
_mFrame1.setVisible(true);
_mFrame2.setVisible(true);
_mFrame1.addWindowListener(this);
_mFrame2.addWindowListener(this);
}
public void windowOpened(WindowEvent e)
{
}
public void windowClosing(WindowEvent e)
{
}
public void windowClosed(WindowEvent e)
{
}
public void windowIconified(WindowEvent e)
{
}
public void windowDeiconified(WindowEvent e)
{
}
public void windowActivated(WindowEvent e)
{
System.out.println("windowActivated " + e.getSource());
if (_mFrame1 == e.getSource())
{
_mFrame2.toFront();
}
}
public void windowDeactivated(WindowEvent e)
{
}
}
ingrid.yao@Eng 1997-11-25
This problem still can be reproduced on Solaris 2.5.1 platform for JDK1.1.5J build.