carookee - group communication for you
Home / JavaForum / Swing + AWT
Infos   |   Features   |   Gold-Edition   |   Kundenservice   
java
  Übersicht
  Forum
Beginner
Java allgemein
JDBC
JNI
Networking
Online-Ressourcen
Swing + AWT
XML
Meckerecke
  Mitglieder
LOGIN





· Passwort vergessen
· Kostenlos anmelden
  Information
  Demo
  Features
  Im Vergleich
  Anmeldung
SUCHE
Beiträge, Foren oder Verfasser finden:
  Kundenservice
  Impressum
  Datenschutz
  AGB
Status
4.896 User online
0 User eingeloggt
 

Beiträge
   Antworten     Neuer Beitrag    

Beitrag 369 von 1460 (25%) |<   <   >   >|

Autor christine
Datum 21.03.03, 00:16
Betreff GridBagLayout Problem


Wir sollen ein Formular Progen. ich sitze seit paar Stunden und habe das GridBagLayout immer noch nicht im Griff!

Also es sind drei Zeilen:
1. Label(Name) + TextField
2. Label(Vorname) + TextField
3. Label(Geburtsdatum) + TextField + Label(.) + TextField + Label(.) + TextField

So weit klappt alles -
was aber stört ist die dritte Zeile - Geburtsdatum und drei TextFieldern die mit dem Punkt getrennt werden sollen - ich kann die Abstände zwischen den Textfielder nicht definieren (zusammen einrücken)
was mache ich da falsch??

panel.setLayout(gridBagLayout);

// Zeile 1
panel.add(new JLabel("Name:"), new GridBagConstraints(0,0, 1,1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,0,0,0), 0,0));
panel.add(new JTextField(10), new GridBagConstraints(1,0, 1,1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,0,0,0), 0,0));

// Zeile 2
panel.add(new JLabel("Vorname:"), new GridBagConstraints(0,1, 1,1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,0,0,0), 0,0));
panel.add(new JTextField(10), new GridBagConstraints(1,1, 1,1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,0,0,0), 0,0));

// Zeile 3
panel.add(new JLabel("Geburtsdatum:"), new GridBagConstraints(0,2, 1,1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,0,0,0), 0,0));
panel.add(new JTextField(2), new GridBagConstraints(1,2, 1,1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,0,0,0), 0,0));
panel.add(new JLabel("."), new GridBagConstraints(2,2, 1,1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,0,0,0), 0,0));
panel.add(new JTextField(2), new GridBagConstraints(3,2, 1,1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,0,0,0), 0,0));
panel.add(new JLabel("."), new GridBagConstraints(4,2, 1,1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,0,0,0), 0,0));
panel.add(new JTextField(2), new GridBagConstraints(5,2, 1,1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,0,0,0), 0,0));


christine


Diskussionsverlauf:
GridBagLayout Problem
    Re: GridBagLayout Problem
        Re: GridBagLayout Problem

 Auf diesen Beitrag antworten
 Neuen Beitrag verfassen


|<   <   >   >|

                                                                                                                                                                                                                           

Impressum  · Datenschutz  · AGB  · Infos  · Presse
Ein modernes Forum: teamturn.com