1 |
/* TestAWT.java -- Tests the AWT like testgtk |
/* TestAWT.java -- Tests the AWT like testgtk |
2 |
Copyright (C) 1998, 1999 Free Software Foundation, Inc. |
Copyright (C) 1998, 1999, 2002 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); |
189 |
|
System.out.println ("Handling " + w + "\n vis = " + w.isVisible()); |
190 |
if (w.isVisible ()) |
if (w.isVisible ()) |
191 |
w.dispose (); |
w.dispose (); |
192 |
else |
else |
193 |
w.setVisible (true); |
{ |
194 |
|
w.setVisible (true); |
195 |
|
w.show(); |
196 |
|
} |
197 |
} |
} |
198 |
} |
} |
199 |
|
|
301 |
toggle.addActionListener(new ActionListener () { |
toggle.addActionListener(new ActionListener () { |
302 |
public void actionPerformed (ActionEvent e) |
public void actionPerformed (ActionEvent e) |
303 |
{ |
{ |
304 |
|
System.out.println ("toggle: " + text.isVisible()); |
305 |
if (text.isVisible ()) |
if (text.isVisible ()) |
306 |
text.setVisible (false); |
text.setVisible (false); |
307 |
else |
else |