-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
1.4.0
-
sparc
-
solaris_8
windowActivated & windowDeactivated events are not trigerred for Undecorated Frames on Solaris/sparc and Solaris/IA with OpenWin.
java -version used:
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
--------------------------------------------------------------------------------
import java.awt.*;
import java.awt.event.*;
public class UndTest {
Frame frame;
Component comp;
Button button;
public UndTest() {
frame=new Frame();
frame.setTitle("Und Test");
frame.setLayout(new FlowLayout());
frame.addWindowListener(
new WindowAdapter()
{
public void windowActivated(WindowEvent e){
comp=null;
comp=e.getComponent();
if(e.getComponent()==frame){
System.out.println("Undecorated Frame is activated\n");
}
}
public void windowIconified(WindowEvent e){
System.out.println("Undecorated Frame is ICONIFIED\n");
}
public void windowDeiconified(WindowEvent e){
System.out.println("Undecorated Frame is DEICONIFIED\n");
}
public void windowDeactivated(WindowEvent e){
System.out.println("Undecorated Frame got Deactivated\n");
}
}
);
frame.setBackground(Color.red);
frame.setSize(500,200);
frame.setUndecorated(true);
button = new Button("Click");
frame.add(button);
frame.setVisible(true);
}
public static void main(String[] args) {
new UndTest();
}
}
--------------------------------------------------------------------------------
Steps to reproduce:
1. Compile & run the above program on OpenWin.
2. Click on the Button.
3. Frame will be activated.
4. Bring some native window on the corner of this frame.
5. windowDeactivated event is not trigerred.
6. Click on the button again.
7. Frame will not come to front and will not trigger windowActivated event.
Refer BugId: 4614881 (classes_swing).
java -version used:
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
--------------------------------------------------------------------------------
import java.awt.*;
import java.awt.event.*;
public class UndTest {
Frame frame;
Component comp;
Button button;
public UndTest() {
frame=new Frame();
frame.setTitle("Und Test");
frame.setLayout(new FlowLayout());
frame.addWindowListener(
new WindowAdapter()
{
public void windowActivated(WindowEvent e){
comp=null;
comp=e.getComponent();
if(e.getComponent()==frame){
System.out.println("Undecorated Frame is activated\n");
}
}
public void windowIconified(WindowEvent e){
System.out.println("Undecorated Frame is ICONIFIED\n");
}
public void windowDeiconified(WindowEvent e){
System.out.println("Undecorated Frame is DEICONIFIED\n");
}
public void windowDeactivated(WindowEvent e){
System.out.println("Undecorated Frame got Deactivated\n");
}
}
);
frame.setBackground(Color.red);
frame.setSize(500,200);
frame.setUndecorated(true);
button = new Button("Click");
frame.add(button);
frame.setVisible(true);
}
public static void main(String[] args) {
new UndTest();
}
}
--------------------------------------------------------------------------------
Steps to reproduce:
1. Compile & run the above program on OpenWin.
2. Click on the Button.
3. Frame will be activated.
4. Bring some native window on the corner of this frame.
5. windowDeactivated event is not trigerred.
6. Click on the button again.
7. Frame will not come to front and will not trigger windowActivated event.
Refer BugId: 4614881 (classes_swing).