|
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
|
|