package Main;
import javax.swing.JFrame;
import javax.swing.JRadioButton;
public class Frame {
public static void main(String[] args) {
JFrame window = new JFrame();
JRadioButton wahl2 = new JRadioButton("hier");
JRadioButton wahl = new JRadioButton("da");
window.setVisible(true);
window.setSize(500, 500);
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
window.add(wahl);
window.add(wahl2);
}
}
hallo,
und zwar hätte ich mal eine frage und hoffe, dass mir jemand diese beantworten könnte.
Ich versuch momentan verzweifelt diese RadioButtons untereinander anzuordnen, jedoch ist bei der ausführung des programmes immer nur einer zu sehen. Ich bin ein totaler anfänger und habe kaum ahnung davon was ich hier machen könnte, voe allem, da setLocation mir auch gar nicht weiterhilft (wenn ich das nutze bleibt alles wie davor und verändert sich nicht)
import javax.swing.JFrame;
import javax.swing.JRadioButton;
public class Frame {
public static void main(String[] args) {
JFrame window = new JFrame();
JRadioButton wahl2 = new JRadioButton("hier");
JRadioButton wahl = new JRadioButton("da");
window.setVisible(true);
window.setSize(500, 500);
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
window.add(wahl);
window.add(wahl2);
}
}
hallo,
und zwar hätte ich mal eine frage und hoffe, dass mir jemand diese beantworten könnte.
Ich versuch momentan verzweifelt diese RadioButtons untereinander anzuordnen, jedoch ist bei der ausführung des programmes immer nur einer zu sehen. Ich bin ein totaler anfänger und habe kaum ahnung davon was ich hier machen könnte, voe allem, da setLocation mir auch gar nicht weiterhilft (wenn ich das nutze bleibt alles wie davor und verändert sich nicht)