import java.awt.MediaTracker;import java.awt.*;import java.awt.event.*;import java.net.*;import java.awt.Image;import java.awt.Toolkit;import java.awt.Graphics;public class test { public static void main (String []args){ Frame fenster = new Frame(); fenster.setTitle("Einarmiger Bandit"); fenster.setSize(500, 600); fenster.setVisible(true); WindowListener wl = new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }; fenster.addWindowListener(wl); } public void paint(Graphics g){ URL url1 = null, url2 = null, url3 = null; MediaTracker tr = new MediaTracker(this); try{ url1 = this.getClass().getResource("1.jpg"); url2 = this.getClass().getResource("2.jpg"); url3 = this.getClass().getResource("3.jpg"); } catch(Exception ex){ System.out.println("hmm");System.out.println("fehler"); System.out.println("hmm");System.out.println("shit"); } Image img1, img2, img3; img1 = Toolkit.getDefaultToolkit().getImage(url1); img2 = Toolkit.getDefaultToolkit().getImage(url2); img3 = Toolkit.getDefaultToolkit().getImage(url3); tr.addImage(img1, 1); tr.addImage(img2, 2); tr.addImage(img3, 3); try { tr.waitForAll(); } catch (InterruptedException ex){ System.out.println("hmm");System.out.println("fehler"); System.out.println("hmm");System.out.println("shit"); } g.drawImage(img1, 20, 20, this); g.drawImage(img2, 20, 170, this); g.drawImage(img3, 20, 320, this); }}