我需要 2 个单选按钮,但每个按钮都在 SWT 中的不同复合组中。我需要在其中进行单选。请帮我写代码。(不需要使用swing ButtonGroup)
    Shell shell = new Shell(display);
    Default = new Group(shell,SWT.RADIO);
    Default.setText("Default");
    Default.setLayout(new RowLayout(SWT.HORIZONTAL));
    compbutton = new Button(Default,SWT.RADIO);
    compbutton.setText("Play against Computer");
    pl2button = new Button(shell,SWT.RADIO);
    pl2button.setText("Player1 Vs Player2");
当我尝试选择单选按钮时,两者都被选中。我只需要其中一个被选中。