Article View: borland.public.jbuilder.java.language
Article #17590help with displaying splash screen at start of program...
From: Benjamin Rutt
Date: Fri, 23 Oct 1998 00:00
Date: Fri, 23 Oct 1998 00:00
24 lines
1446 bytes
1446 bytes
I would like to display a graphics file as my program is loading. Does
anyone know how to do this? I would like to use a java.awt.Window object,
since it doesn't have any minimize, maximize or close buttons, like Frames
and Dialogs do. It will look cleaner in a Window, I'm told. The following
is my code, which is placed at the start of my jbInit(): (BTW this is an
application, not an applet)
Window w = new Window((Frame)this);
w.setSize(250, 250);
w.setLocation(200, 200);
Image img =
w.getToolkit().getDefaultToolkit().getImage("c:\\images\\image1.jpg");
w.show();
Graphics g = w.getGraphics();
g.drawImage(img, 0, 0, this);
g.drawString("hello, world!", 0, 0);
w.repaint();
A grey box appears when this is run (letting me know that the window was
drawn), however there is no image, and also there is no "hello world"
message, as there should be if this was working. Can anyone help me out?
Thanks,
Benjamin Rutt
Technical Details
Message-ID:
<01bdfec6$139a4920$dfe2bcc0@ITS.city.bloomington.in.us>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,4720e0d8c1bf48cb,start X-Google-Attributes: gidf74b3,public From: "Benjamin Rutt" <brutt@indiana.edu> Subject: help with displaying splash screen at start of program... Date: 1998/10/23 Message-ID: <01bdfec6$139a4920$dfe2bcc0@ITS.city.bloomington.in.us> X-Deja-AN: 404407704 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language