gcc/gcj 3.4 - bug report - test case
rezaei@promail.com
rezaei@promail.com
Sat Jul 19 04:47:00 GMT 2003
I tried sending this as an attachment, and it failed. So here is the plain text
version. To actually run the program, just place a .gif and .png file in the same
directory named new.gif and new.png. Any old image will do.
Here is the test case:
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.widgets.*;
/**
* Date: Jul 17, 2003
* Time: 8:46:02 PM
*/
public class SwtTest1
{
public static void main (String [] args) {
Display display = new Display ();
Shell shell = new Shell (display);
Image image = new Image(display, "new.png");
System.out.println("loaded png just fine");
image.dispose();
image = new Image(display, "new.gif");
System.out.println("loaded gif fine.");
image.dispose();
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
image.dispose ();
display.dispose ();
}
}
Thanks
Moh
More information about the Java
mailing list