A
Andrej1
Gast
Hallo liege Mitglieder
Bitte helft uns
import javax.swing.*;
import java.awt.*;
public class Fenster
{
public static void main (String args[])
{
JFrame Fenster = new JFrame ("Vocamory");
Container contentPane = Fenster.getContentPane();
MenuBar menüleiste = new MenuBar();
Menu menu1 = new Menu("Menü");
Menu menu2 = new Menu ("Neues Spiel");
Menu menu3 = new Menu ("1 Spieler");
Menu menu4 = new Menu ("2 Spieler");
Menu menu5 = new Menu ("3 Spieler");
MenuItem item1 = new MenuItem ("Hilfe");
MenuItem item2 = new MenuItem ("Beenden");
ButtonGroup buttongroup1 = new ButtonGroup ();
ButtonGroup buttongroup2 = new ButtonGroup ();
ButtonGroup buttongroup3 = new ButtonGroup ();
JRadioButton jradiobutton1 = new JRadioButton ("Anfänger");
JRadioButton jradiobutton2 = new JRadioButton ("Fortgeschrittener");
JRadioButton jradiobutton3 = new JRadioButton ("Profi");
JRadioButton jradiobutton4 = new JRadioButton ("Anfänger");
JRadioButton jradiobutton5 = new JRadioButton ("Fortgeschrittener");
JRadioButton jradiobutton6 = new JRadioButton ("Profi");
JRadioButton jradiobutton7 = new JRadioButton ("Anfänger");
JRadioButton jradiobutton8 = new JRadioButton ("Fortgeschrittener");
JRadioButton jradiobutton9 = new JRadioButton ("Profi");
menu1.add (menu2);
menu1.add (item1);
menu1.add (item2);
menu2.add (menu3);
menu2.add (menu4);
menu2.add (menu5);
menu3.add (jradiobutton2);
menu3.add (jradiobutton2);
menu3.add (jradiobutton3);
menu4.add (jradiobutton4);
menu4.add (jradiobutton5);
menu4.add (jradiobutton6);
menu5.add (jradiobutton7);
menu5.add (jradiobutton8);
menu5.add (jradiobutton9);
menüleiste.add (menu1);
Fenster.setMenuBar(menüleiste);
Fenster.setSize (600,450);
Fenster.setVisible (true);
}
}
Das Problem besteht im "adden" der JRadioButtons.
[/code]
Bitte helft uns
import javax.swing.*;
import java.awt.*;
public class Fenster
{
public static void main (String args[])
{
JFrame Fenster = new JFrame ("Vocamory");
Container contentPane = Fenster.getContentPane();
MenuBar menüleiste = new MenuBar();
Menu menu1 = new Menu("Menü");
Menu menu2 = new Menu ("Neues Spiel");
Menu menu3 = new Menu ("1 Spieler");
Menu menu4 = new Menu ("2 Spieler");
Menu menu5 = new Menu ("3 Spieler");
MenuItem item1 = new MenuItem ("Hilfe");
MenuItem item2 = new MenuItem ("Beenden");
ButtonGroup buttongroup1 = new ButtonGroup ();
ButtonGroup buttongroup2 = new ButtonGroup ();
ButtonGroup buttongroup3 = new ButtonGroup ();
JRadioButton jradiobutton1 = new JRadioButton ("Anfänger");
JRadioButton jradiobutton2 = new JRadioButton ("Fortgeschrittener");
JRadioButton jradiobutton3 = new JRadioButton ("Profi");
JRadioButton jradiobutton4 = new JRadioButton ("Anfänger");
JRadioButton jradiobutton5 = new JRadioButton ("Fortgeschrittener");
JRadioButton jradiobutton6 = new JRadioButton ("Profi");
JRadioButton jradiobutton7 = new JRadioButton ("Anfänger");
JRadioButton jradiobutton8 = new JRadioButton ("Fortgeschrittener");
JRadioButton jradiobutton9 = new JRadioButton ("Profi");
menu1.add (menu2);
menu1.add (item1);
menu1.add (item2);
menu2.add (menu3);
menu2.add (menu4);
menu2.add (menu5);
menu3.add (jradiobutton2);
menu3.add (jradiobutton2);
menu3.add (jradiobutton3);
menu4.add (jradiobutton4);
menu4.add (jradiobutton5);
menu4.add (jradiobutton6);
menu5.add (jradiobutton7);
menu5.add (jradiobutton8);
menu5.add (jradiobutton9);
menüleiste.add (menu1);
Fenster.setMenuBar(menüleiste);
Fenster.setSize (600,450);
Fenster.setVisible (true);
}
}
Das Problem besteht im "adden" der JRadioButtons.
[/code]