JRadioButton单选按钮代码2
来源:互联网 发布:孟加拉 各月进出口数据 编辑:程序博客网 时间:2024/05/17 04:57
public class JRadioButtonTest extends JApplet{
public JRadioButtonTest () {
Container contentPane = getContentPane();
Icon icon = new ImageIcon("Login.gif");
ButtonGroup group = new ButtonGroup();
JRadioButton[] radioButtons = new JRadioButton[] {
new JRadioButton(),
new JRadioButton(icon),
new JRadioButton(icon, true),
new JRadioButton("idea!"),
new JRadioButton("idea!",true),
new JRadioButton("idea!",icon),
new JRadioButton("idea!",icon, true)
};
contentPane.setLayout(new FlowLayout());
for(int i=0; i < radioButtons.length; ++i) {
group.add(radioButtons[i]);
radioButtons[i].setBorderPainted(true);
contentPane.add(radioButtons[i]);
if(radioButtons[i].getIcon() != null) {
System.out.println("setting selected icon");
radioButtons[i].setSelectedIcon(new ImageIcon("Login.gif"));
}
}
}
}
- JRadioButton单选按钮代码2
- JRadioButton单选按钮代码1
- JavaSwing_2.3: JRadioButton(单选按钮)
- JRadioButton(单选按钮)组件使用
- swing 学习笔记四(单选按钮JRadioButton )
- Java Swing界面编程(26)---单选按钮:JRadioButton
- JRadioButton(单选按钮)添加事件监听
- Java中JRadioButton单选按钮分组方法
- Java单选按钮JRadioButton取消选择状态的方法
- 单选组件JRadioButton
- JRadioButton如何变成单选
- Java Swing JRadioButton 给radioButton加图片不隐藏单选按钮
- 8、单选按钮(JRadioButton)和复选框(JCheckBox)
- Java 下拉框JComboBox和单选按钮JRadioButton简单举例使用
- Java复选框JCheckBox和单选按钮JRadioButton用法详解
- 单选与复选控件JRadioButton与JCheckBox的使用
- 一步一步地实现菜单栏(JMenuBar)工具栏(JPopupMenu)组合框(JComboBox)复选框(JCheckBox)单选按钮(JRadioButton)文本域的综合应用(一)
- 一步一步地实现菜单栏(JMenuBar)工具栏(JPopupMenu)组合框(JComboBox)复选框(JCheckBox)单选按钮(JRadioButton)文本域的综合应用(二)
- dynaTrace Ajax版使用指南[译]
- Struts2之Action基础与配置
- 部分iPad mini 2存屏幕残影问题
- CSDN网盘入口
- 新闻门户网站如何进行SEO优化
- JRadioButton单选按钮代码2
- newlisp 监控Linux进程 四
- 定制iOS 7中的导航栏和状态栏
- alsa编程
- linux进程间通信概述
- C#总结1
- WebKit加载网页的流程
- 有一个分数数列2/1,3/2,5/3,8/5,。。。。。求出这个数列的前20项之和
- PackageManagerService对象构造过程