Code:
JPanel reiter5 = new JPanel();
reiter5.setBorder(rahmen);
reiter5.setOpaque(true);
reiter5.setBorder(new TitledBorder(new EtchedBorder(),"Seite 4"));
GridBagLayout testverfahren_panel = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.VERTICAL;
JLabel objektive_testverfahren = new JLabel("04 objektive Testverfahren (z. B. CAT, Schwarzfuß, Sceno, TAT- oder Rorschach-Kurzform).........", JLabel.LEFT);
c.weightx = 0.0;
c.gridx = 0;
c.gridy = 0;
testverfahren_panel.setConstraints(objektive_testverfahren, c);
reiter5.add(objektive_testverfahren);
objektive_testverfahren_radioButton1 = new JRadioButton("1 nein");
c.weightx = 0.0;
c.gridx = 0;
c.gridy = 1;
testverfahren_panel.setConstraints(objektive_testverfahren_radioButton1, c);
reiter5.add(objektive_testverfahren_radioButton1);
objektive_testverfahren_radioButton2 = new JRadioButton("2 ja");
c.weightx = 0.0;
c.gridx = 0;
c.gridy = 2;
testverfahren_panel.setConstraints(objektive_testverfahren_radioButton2, c);
reiter5.add(objektive_testverfahren_radioButton2);
JLabel funktionstests = new JLabel("06 Funktions-, Konzentrations- oder Leistungstests (z. B. KTK, DRT, d2, HAWIE(K)-R, IST, K-ABC).........", JLabel.LEFT);
//c.weightx = 0.0;
c.gridx = 1;
c.gridy = 0;
testverfahren_panel.setConstraints(funktionstests, c);
reiter5.add(funktionstests);
funktionstests_radioButton1 = new JRadioButton("1 nein");
testverfahren_panel.setConstraints(funktionstests_radioButton1, c);
reiter5.add(funktionstests_radioButton1);
c.gridx = 1;
c.gridy = 1;
funktionstests_radioButton2 = new JRadioButton("2 ja");
c.gridx = 1;
c.gridy = 2;
testverfahren_panel.setConstraints(funktionstests_radioButton2, c);
reiter5.add(funktionstests_radioButton2);
Das soll so aussehen:
04 objektive Testverfahren...........................1 nein 2 ja
06 Funktions-, Konzentrations......................1 nein 2 ja
Das Label 06 Funktions-, Konzentrations- oder Leistungstests (z. B. KTK, DRT, d2, HAWIE(K)-R, IST, K-ABC)......... hat dann doch den Wert 0,1 oder? Was mache ich da falsch?