-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.2.0
-
x86
-
windows_95
Name: jtC48319 Date: 06/12/98
import java.awt.*;
import java.awt.event.*;
public class ShowDialog extends Dialog implements FocusListener{
public ShowDialog(Frame f){
super(f);
addFocusListener(this);
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
dispose();
System.exit(0);
}
});
setVisible(true);
}
public static void main(String args[]){
Frame f=new Frame();
new ShowDialog(f);
}
public void focusGained(FocusEvent e){
System.out.println("Focus gained");
}
public void focusLost(FocusEvent e){
System.out.println("Focus lost");
}
}
(Review ID: 33543)
======================================================================