Lösung Übung 16: Ganz einfache Window-Applikation (Version 1)


import java.awt.*;
import java.awt.event.*;

public class SimpleWindowApplikation {

	public static void main( String[] args ) {
		
		Frame appWin = new Frame();
		
		appWin.addWindowListener(
			new WindowAdapter() {
				public void windowClosing( WindowEvent e ) {
					System.exit(0);
				}				
			}
		);
		
		Label label = new Label("Ich bin eine echte Window-Applikation. Wow!");
		appWin.add( label );
		appWin.setSize( 600, 400 );
		appWin.setVisible( true );
	}
}
																						    		
															
[Index]