填空题
下面的应用程序中有一个组,组内有4个单选按钮,请在画线处填入正确的语句使程序能正确运行。
import javax.swing.*;
public class OneTeam extends JFrame
{
JRadioButton[] teams = new JRadioButton[3];
public OneTeam()
{
super("One Team");
setSize (140,160);
setDefaultCloseOperation(JFrame.EXIT ON CLOSE
JPanel pane = new JPanel();
teams[0] = new JRadioButton("red choose");
teams[l] = new JRadioButton("blue choose");
teams[2] = new JRadioButton("green choose");
{{U}}【11】 {{/U}};
for ( int i = 0;i < teams.length;i++)
{
group.add(teams[i]);
pane.add(teams[i]);
}
setContentPane(pane);
}
public static void main(String arguments[]
{
OneTeam ot= new OneTeam();
ot.show();
}