
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;

// Versuch ein Fensters mit einer Eingabezeile

public class BorderLayout3 extends JFrame {


  //Frame konstruieren
  public BorderLayout3() {
    setSize(400, 300);
    setTitle("BorderLayout3");
    setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    setGUI();
  }

  private void setGUI() {
     JButton bn1;
    this.getContentPane().setLayout ( new BorderLayout(10,20) );  // vgap, hgap

    bn1 = new JButton("ok");

    JLabel label1 = new JLabel("ich bin ein Label");
    JTextField edit1 = new JTextField("unummer");
    //JTextPane edit2 = new JTextPane();
    JTextField edit2 = new JTextField("unummer");

 label1.setFont( new Font("Arial", Font.BOLD,18)  );
 edit1.setFont( new Font("Arial", Font.BOLD,18)  );
 edit2.setFont( new Font("Arial", Font.BOLD,18)  );

   this.getContentPane().add(bn1, BorderLayout.SOUTH);
    this.getContentPane().add(label1, BorderLayout.WEST);
   this.getContentPane().add(edit1, BorderLayout.NORTH);
   // this.getContentPane().add(  new JButton() , BorderLayout.NORTH);
    this.getContentPane().add(edit2, BorderLayout.CENTER);
  } // create



  public static void main(String[] args) {
    BorderLayout3 frame = new BorderLayout3();
    frame.setVisible(true);
  }


}
