This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
gcc/gcj 3.4 - bug report - test case
- From: rezaei at promail dot com
- To: java at gcc dot gnu dot org
- Date: Sat, 19 Jul 2003 00:45:22 -0400
- Subject: gcc/gcj 3.4 - bug report - test case
- Reply-to: rezaei at promail dot com
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