next up previous contents
Nächste Seite: Tastaturereignisse abfragen Aufwärts: AWT / Swing Vorherige Seite: Fenster erzeugen   Inhalt

AWT-List-Boxen

import java.awt.*;

public class ListBoxTest {
    public static void main (String [] args) {
        Frame frame = new Frame("Mehrfachauswahl");
        frame.setLocation(100,100);
        frame.setSize(300,100);
        List auswahl = new List(4,true);
        auswahl.add("Textverarbeitung");
        auswahl.add("Tabellenkalkulation");
        auswahl.add("Präsentation");
        auswahl.add("HTML-Dokumente");
        auswahl.add("WebDesign");
        auswahl.add("JAVA");
        auswahl.add("PHP");
        auswahl.add("MySQL");
        auswahl.add("Druck & Ausgabe");
        frame.add(auswahl);
        frame.show();
    }
}



Alfred Nussbaumer 2003-02-10