swing 选项框(遍历选中的)
来源:互联网 发布:win10要求输入网络凭证 编辑:程序博客网 时间:2024/03/29 00:33
public String OdsSystem;
private void jbt_executeActionPerformed(java.awt.event.ActionEvent evt) {
//select OdsSystem
if (this.jrb_crm.isSelected()) {
OdsSystem = "CRM";
}
if (this.jrb_cbs.isSelected()) {
OdsSystem = "CBS";
}
if (this.jrb_sps.isSelected()) {
OdsSystem = "SPS";
}
if (StringUtil.isEmpty(OdsSystem)){
JOptionPane.showMessageDialog(null, "请选择系统!");
return;
}
//select OdsCity
int n=this.jPanel1.getComponentCount();
int m=0;//选中一个地市,计数器m自加1
for (int i = 0; i < n; i++) {
if(((JCheckBox) this.jPanel1.getComponent(i)).isSelected()){
System.out.println(OdsSystem + "_" +((JCheckBox) this.jPanel1.getComponent(i)).getText());
m++;
}
}
if (m==0){
JOptionPane.showMessageDialog(null, "请选择地市!");
return;
}
}
0 0
- swing 选项框(遍历选中的)
- swing 选项框(全选)
- swing 组合框(下拉框)获取选中的值
- Swing 的选项卡面板
- Swing 的选项卡面板
- jquery遍历选中或者未选中的复选框
- 获取选中的下拉框选项的值
- js获取checkbox复选框获取选中的选项
- Easyui 下拉框选项不能选中的问题
- setSingleChoiceItems方法-使单选项列表框默认选中前次选中的值
- 遍历已选中的checkbox
- Swing组件之复选框选项
- Swing实现选项卡功能(JTabbedPane)
- Java获取下拉菜单选中的选项
- combobox自动选中默认的选项
- input选项点后面的字就能选中
- 遍历屏幕设置的选项
- Android中使单选项列表框默认选中前次保存的值(即setSingleChoiceItems方法的使用)
- 在VC中给Slider添加定制的Tooltips
- swing 选项框(全选)
- 九度OJ 1058:反序输出 (基础题)
- H264编码 封装成MP4格式 视频流 RTP封包
- 栈-表达式求值
- swing 选项框(遍历选中的)
- Android Studio下安装Volley
- hive1.1安装
- python获取当前路径的方法
- swing 关闭主窗口退出EXIT_ON_CLOSE
- 将list集合进行切割 转换为队列进行处理
- android 的SDK的更新
- Address already in use: JVM_Bind(端口冲突)
- 九度OJ 1059:abc (基础题)