Vorlesungen
  Download     DBS     Sprachen     Oberflächen     File Formats     Impressum     Datenschutz  
1. Sem
2. Sem
3. Sem
GUI I / SAT(II)
MC & AP
Programmierung 3
Prog / Wing
Web-Technologien
4. Sem
5. Sem
Wahlpflicht-SoSe
Wahlpflicht-WiSe
Projektwochen
Allgemein:
Startseite
Vorlesungen
Labore
Sinnvolle Programme
Lineare Regression
GUI-Entwurfsarbeit
Single-Format
Design Pattern-Termine
Observer1
Bsp2
Json-Array
Json-Dialogelemente
Webtechnologien

GridBagLayout

private void setGUI() {
  setLayout(new GridBagLayout());
		
  JLabel label1 = new JLabel("Name");
  label1.setFont( new Font("Verdana", Font.PLAIN,18));
  add(label1,
   new GridBagConstraints(
     0, 0,  // gridx  gridY
     1, 1,   // Anz Spalten anz Zeilen
     0.0, 0.0,  // Gewichtung in x und y
     GridBagConstraints.WEST,   // Ausrichtu8ng des Elements 
     GridBagConstraints.NONE, //  Fill:  HORIZOPNTAL, VERTICAL, BOTH, NONE
     new Insets(0,20,0,0), // Top left, bottom, right,
     0,	0  // IPdax und IPady  zusätzliche Breite und Höhe
    )	
   );
		
   JTextField tName = new JTextField("tName");
   tName.setFont( new Font("Verdana", Font.PLAIN,18));
   add(tName,
   new GridBagConstraints(
     1, 0,  // gridx  gridY
     1, 1,   // Anz Spalten anz Zeilen
     0.0, 0.0,  // Gewichtung in x und y
     GridBagConstraints.WEST,   // Ausrichtu8ng des Elements 
     GridBagConstraints.HORIZONTAL, //  Fill:  HORIZOPNTAL, VERTICAL, BOTH, NONE
     new Insets(0,20,0,0), // Top left, bottom, right,
     0,	0  // IPdax und IPady  zusätzliche Breite und Höhe
    )	
   );
 ); // setGUI


ActionListener
if Bedingungen