JdbRadiaButton的初始状态 请问,然后让JdbRadiaButton初始为一个选种?我selected属性设为true时,可以选中,但会报错,为什么? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ButtonGroup buttonGroup1 = new ButtonGroup(); JdbRadioButton dbRadioButton0 = new JdbRadioButton(); JdbRadioButton dbRadioButton1 = new JdbRadioButton(); dbRadioButton0.setEnabled(false); dbRadioButton0.setSelected(false); dbRadioButton0.setText("使用"); dbRadioButton0.setButtonGroup(buttonGroup1); dbRadioButton0.setColumnName("Status"); dbRadioButton0.setDataSet(queryDataSetResource); dbRadioButton0.setSelectedDataValue("1"); dbRadioButton1.setEnabled(false); dbRadioButton1.setText("未使用"); dbRadioButton1.setButtonGroup(buttonGroup1); buttonGroup1.add(dbRadioButton1); buttonGroup1.add(dbRadioButton0); dbRadioButton1.setColumnName("Status"); dbRadioButton1.setDataSet(queryDataSetResource); dbRadioButton1.setSelectedDataValue("0");代码就是这样子的,有什么地方错了?为什么把dbRadioButton0.setSelected(false);改为dbRadioButton0.setSelected(true);就出错? 貌似你的设置重复,上面已经设置了buttongroup,下面有添加了一次还有,报的什么错?不把错误发出来,很难知道是什么问题! 【求助,急,在线等】 如何让Data类型的变量在JTable表格中显示为XXXX-XX-XX格式? java线程池 菜鸟向大神求教~~~ 今天面试给出的一个很简单的面试题 怎么写java向手机发送短信 学校录取学生 请教有关java写文件时 回车换行符不能正常显示的问题 新人求助 请推荐一门语言! java 资料 一个关于javamail 的程序可以编译但运行出错,怎么办? 专门用来输入IP地址的JTextField
JdbRadioButton dbRadioButton0 = new JdbRadioButton();
JdbRadioButton dbRadioButton1 = new JdbRadioButton();
dbRadioButton0.setEnabled(false);
dbRadioButton0.setSelected(false);
dbRadioButton0.setText("使用");
dbRadioButton0.setButtonGroup(buttonGroup1);
dbRadioButton0.setColumnName("Status");
dbRadioButton0.setDataSet(queryDataSetResource);
dbRadioButton0.setSelectedDataValue("1");
dbRadioButton1.setEnabled(false);
dbRadioButton1.setText("未使用");
dbRadioButton1.setButtonGroup(buttonGroup1);
buttonGroup1.add(dbRadioButton1);
buttonGroup1.add(dbRadioButton0);
dbRadioButton1.setColumnName("Status");
dbRadioButton1.setDataSet(queryDataSetResource);
dbRadioButton1.setSelectedDataValue("0");
代码就是这样子的,有什么地方错了?为什么把dbRadioButton0.setSelected(false);改为dbRadioButton0.setSelected(true);就出错?
还有,报的什么错?不把错误发出来,很难知道是什么问题!