//Importanweisungenclass MyBild extends Frame { Image img ; static String filename; public MyBild(String filename) { this.filename = filename; img = Toolkit.getDefaultToolkit().getImage(filename); setSize(); setVisible(); } public void paint(Graphics g) { g.drawImage(img, 20, 20, this); } public static void main() { Frame f = new MyBild("Bild1.gif"); // Es funkzioniert //Jetzt kommt das Problem /** * for(;;) { * if((args.length < 1) || (args[0] == null)) * println("Dateiname eingeben"); * break; * filename = args[0]; * Frame f = new MyBild(filename); * * ES FUNKTIONIERT NICT * } */ }}