home *** CD-ROM | disk | FTP | other *** search
- import java.awt.Component;
- import java.awt.Dimension;
- import java.awt.Frame;
- import java.awt.Graphics;
- import java.awt.Image;
- import java.awt.Toolkit;
- import java.awt.Window;
- import java.awt.image.ImageObserver;
- import java.io.File;
-
- public class JDPSplash extends Window implements Runnable {
- Image thisImage;
- JDPImageLoader imageLoader;
-
- public JDPSplash() {
- super(new Frame());
- Dimension var1 = Toolkit.getDefaultToolkit().getScreenSize();
- int var2 = (var1.width - 560) / 2;
- int var3 = (var1.height - 215) / 2;
- ((Component)this).reshape(var2, var3, 560, 215);
- String var4 = "Images" + File.separator + "JDPSplash.jpg";
- this.imageLoader = new JDPImageLoader((JDPUser)null, this, var4);
- (new Thread(this.imageLoader)).start();
- (new Thread(this)).start();
-
- try {
- Thread.sleep(2000L);
- } catch (Exception var5) {
- }
- }
-
- public void paint(Graphics var1) {
- this.update(var1);
- }
-
- public void update(Graphics var1) {
- if (this.imageLoader != null && this.imageLoader.getImageReady()) {
- this.thisImage = this.imageLoader.thisImage;
- this.imageLoader = null;
- }
-
- var1.drawImage(this.thisImage, 0, 0, (ImageObserver)null);
- }
-
- public void run() {
- while(!this.imageLoader.getImageReady()) {
- try {
- Thread.sleep(500L);
- } catch (Exception var2) {
- }
- }
-
- ((Window)this).show();
-
- try {
- Thread.sleep(10000L);
- } catch (Exception var1) {
- }
-
- ((Component)this).hide();
- ((Window)this).dispose();
- }
-
- public void layout() {
- ((Component)this).repaint();
- }
- }
-