小编Nic*_*oul的帖子

Java:JOptionPane Radio Buttons

我正在研究一个简单的程序来帮助我计算混合eLiquid的东西.我试图在JOptionPane.showInputDialog中添加单选按钮,但我无法将它们链接在一起.当我运行程序时,什么都没有出现.这就是我的全部:

JRadioButton nicSelect = new JRadioButton("What is the target Nicotine level? ");
        JRadioButton b1 = new JRadioButton("0");
        JRadioButton b2 = new JRadioButton("3");
        JRadioButton b3 = new JRadioButton("6");
        JRadioButton b4 = new JRadioButton("12");
        JRadioButton b5 = new JRadioButton("18");
        JRadioButton b6 = new JRadioButton("24");
Run Code Online (Sandbox Code Playgroud)

java swing input button joptionpane

3
推荐指数
2
解决办法
1万
查看次数

标签 统计

button ×1

input ×1

java ×1

joptionpane ×1

swing ×1