1 |
/* TestAWT.java -- Tests the AWT like testgtk |
/* TestAWT.java -- Tests the AWT like testgtk |
2 |
Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. |
Copyright (C) 1998, 1999 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
186 |
} |
} |
187 |
|
|
188 |
Window w = (Window) windows.get (source); |
Window w = (Window) windows.get (source); |
|
System.out.println ("Handling " + w + "\n vis = " + w.isVisible()); |
|
189 |
if (w.isVisible ()) |
if (w.isVisible ()) |
190 |
w.dispose (); |
w.dispose (); |
191 |
else |
else |
192 |
{ |
w.setVisible (true); |
|
w.setVisible (true); |
|
|
w.show(); |
|
|
} |
|
193 |
} |
} |
194 |
} |
} |
195 |
|
|
297 |
toggle.addActionListener(new ActionListener () { |
toggle.addActionListener(new ActionListener () { |
298 |
public void actionPerformed (ActionEvent e) |
public void actionPerformed (ActionEvent e) |
299 |
{ |
{ |
|
System.out.println ("toggle: " + text.isVisible()); |
|
300 |
if (text.isVisible ()) |
if (text.isVisible ()) |
301 |
text.setVisible (false); |
text.setVisible (false); |
302 |
else |
else |