![]() |
Hilfe zu Java
Liste der Anhänge anzeigen (Anzahl: 1)
Hallo Leutz
Hab ein kleines Problem. Ich möchte folgende Element wie Abgebiltet anordnen Textfeld,Label, mehrer Button und List. Was mache ich Falsch Code ist dabei. Gruß Pierre
Delphi-Quellcode:
import java.awt.*;
public class Fenster extends Frame { Button b1,b2,b3,b4,b5,b6; Fenster(String s) { super(s); TextField t1=new TextField(); List lt1=new List(); Label l1=new Label(); Panel p1=new Panel(); p1.setLayout(new GridLayout(3,1)); //this.setLayout (new BorderLayout()); Panel p2=new Panel(); p2.setLayout(new GridLayout(2,2)); //this.setLayout(new BorderLayout()); Panel p3=new Panel(); p3.setLayout (new FlowLayout()); //this.setLayout (new FlowLayout()); b1= new Button ("Button 1"); b2= new Button ("Button 2"); b3= new Button ("Button 3"); b4= new Button ("Button 4"); b5= new Button ("Button 5"); b6= new Button ("Button 6"); p1.add(b1); p1.add(b2); p1.add(b3); p2.add(lt1); p3.add(b4); p3.add(b5); p3.add(b6); add("North",t1); add("South",l1); //add("West",p2); add("Center",p3); add("Center",p1); add("Center",p2); } } public class Aufruf { public static void main(String args[]) { Fenster f; f= new Fenster("Fenster ganz ohne logische Funktion(F GOLF)"); f.setSize(400,300); f.show(); } } |
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:27 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz