JRadioButton组件问题,求指点 package com.law; import java.awt.*; import javax.swing.*; public class JRadioButtonTest extends JFrame { public JRadioButtonTest() { setTitle("JRadioButton组件"); Container container=getContentPane(); JRadioButton jb1=new JRadioButton("button1"); JRadioButton jb2=new JRadioButton("button2"); JRadioButton jb3=new JRadioButton("button3"); ButtonGroup group=new ButtonGroup(); group.add(jb1); group.add(jb2); group.add(jb3); container.add(group); setBounds(100,100,300,300); setVisible(true); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); } public static void main(String[] args) { new JRadioButtonTest(); } } ButtonGroup不能这样添加到容器么?提示这个错误,不知怎么解决。求指点。谢谢! The method add(Component) in the type Container is not applicable for the arguments (ButtonGroup)