import java.applet.Applet; import java.awt.*; public class load extends Applet{ int i=0; int f=0; public void paint(Graphics g){ if(f==0){ g.setColor(Color.black); g.drawString("Loading Wierdows XP ", 200, 100); //Loading WINDOWS XT g.drawRect(21, 150, 500, 21);//joonistatakse must kast for(i=0;i<500;i++){ g.setColor(Color.red); //joonistatakse loading g.fillRect(22, 151, i, 20); g.setColor(Color.black); g.drawString("Loading... ", 150, 200); g.drawString(i/5+" ", 210, 200); g.setColor(Color.white); g.fillRect(215, 215, 300, 20); //valge ristkülik g.setColor(Color.black); g.drawString("%", 225, 200); try{Thread.sleep(10);}catch(Exception e){} g.setColor(Color.white); g.drawString(i/5+" ", 210, 200); //joonistatakse numbrid üle } g.setColor(Color.black); g.drawString("100 ", 205, 200); //joonistab "100" //g.fillRect(200, 100, 250, 20); //valge ristkülik g.drawString("Loading Wierdows XP completed ", 200, 100); try{Thread.sleep(15000);}catch(Exception e){} f=1; } //static class desktop extends Applet{ //public void paint(Graphics g){ Image pilt=Toolkit.getDefaultToolkit().getImage("desktop.jpg"); g.drawImage(pilt,0,0,this); } public static void main(String argumendid[]){ Window f=new Window(new Frame()); //load l1=new load(); f.add(new load()); f.setSize(1024,768); f.setVisible(true); //try{Thread.sleep(15000);}catch(Exception e){} //f.add(new load.desktop()); //f.validate(); } }