1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
JPanel panel2 = new JPanel();
panel2.setLayout(new GridBagLayout());
JLabel labelWhen = new JLabel("WHEN:");
JLabel labelThen = new JLabel("THEN:");
JScrollPane scrollPane1 = new JScrollPane(new JTextArea());
scrollPane1.setPreferredSize(new Dimension(200,100));
JScrollPane scrollPane2 = new JScrollPane(new JTextArea());
scrollPane2.setPreferredSize(new Dimension(200,100));
GridBagConstraints gbc = new GridBagConstraints();
gbc.insets = new Insets(-100, -350, 0, -260);
panel2.add(labelWhen, gbc);
gbc.insets = new Insets(-100, 0, 0, 0);
panel2.add(scrollPane1, gbc);
// gbc.gridx = GridBagConstraints.REMAINDER;
gbc.insets = new Insets(250, -750, 0, -260);
panel2.add(labelThen, gbc);
// gbc.gridx = GridBagConstraints.RELATIVE;
gbc.insets = new Insets(300, -200, 0, 0);
panel2.add(scrollPane2, gbc); |
Partager