import java.awt.*;
import javax.swing.*;
public class Main extends JFrame{
public Main(){
JPanel panel = new JPanel(new GridBagLayout());
Container contPane = getContentPane();
contPane.setLayout(new GridBagLayout());
panel.add(new JLabel("bla 1:"), new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
panel.add(new JTextField(), new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 1, 0));
panel.add(new JLabel("bla 1:"), new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
panel.add(new JTextField(), new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
panel.add(new JLabel("bla 1:"), new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
panel.add(new JTextField(), new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
panel.add(new JLabel("bla 1:"), new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
panel.add(new JTextField(), new GridBagConstraints(1, 3, 1, 1, 1.0, 1.0,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
contPane.add(panel, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(50, 50, 50, 50), 0, 0));
}
//------------------------------------------------------------------------------------------------
public static void main(String args[]){
Main app = new Main();
app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
app.setSize(300,300);
app.setLocationRelativeTo(null);
app.setVisible(true);
}
//================================================================================================
}