程序如下,有问号的地方是什么意思?
public class Win100401 extends JFrame {
JCheckBox check;
public Win100401() {
setLayout(new FlowLayout());
check = new JCheckBox("good");
// ???? 这里是什么写法?
check.addItemListener(e->;{
if(check.isSelected())
System.out.println(check.getText());
});
//
add(check);
setBounds(10,10,460,360);
setVisible(true);
setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
}
}
public static void main(String args[])
{
new Win();
}
public class Win100401 extends JFrame {
JCheckBox check;
public Win100401() {
setLayout(new FlowLayout());
check = new JCheckBox("good");
// ???? 这里是什么写法?
check.addItemListener(e->;{
if(check.isSelected())
System.out.println(check.getText());
});
//
add(check);
setBounds(10,10,460,360);
setVisible(true);
setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
}
}
public static void main(String args[])
{
new Win();
}