import javax.swing.JRadioButton; //导入方法依赖的package包/类

/**

* Set up and show the dialog. The first Component argument determines which

* frame the dialog depends on; it should be a component in the dialog's

* controlling frame. The second Component argument should be null if you

* want the dialog to come up with its left corner in the center of the

* screen; otherwise, it should be the component on top of which the dialog

* should appear.

*/

public BaseDialog(Component frameComp, Component locationComp,

String title, I_TickerManager tickerManager) {

super(JOptionPane.getFrameForComponent(frameComp), title, true);

this.frameComp = frameComp;

dateChooser = new JDateChooser(Calendar.getInstance().getTime());

dateChooser.setLocale(new Locale("fi", "FI"));

this.tickerManager = tickerManager;

// Create and initialize the buttons.

cancelButton = new JButton(BUTTON_CANCEL);

cancelButton.addActionListener(this);

cancelButton.setActionCommand(BUTTON_CANCEL);

okButton = new JButton(BUTTON_OK);

okButton.setActionCommand(BUTTON_OK);

okButton.addActionListener(this);

getRootPane().setDefaultButton(okButton);

okButton.setEnabled(false);

rateField = new JTextField(FIELD_LEN);

rateField.setVisible(true);

rateField.setText("1.0000");

rateFieldLabel = new JLabel("Valuuttakurssi: ");

rateFieldLabel.setLabelFor(rateField);

rateFieldLabel.setVisible(true);

localCurrencyButton = new JRadioButton(localCurrencyString);

foreignCurrencyButton = new JRadioButton(foreignCurrencyString);

currencyGroup = new ButtonGroup();

localCurrencyButton.setActionCommand(localCurrencyString);

foreignCurrencyButton.setActionCommand(foreignCurrencyString);

localCurrencyButton.setSelected(true);

currencyGroup.add(localCurrencyButton);

currencyGroup.add(foreignCurrencyButton);

updateRateFieldCcy("EUR", false);

localCurrencyButton.addActionListener(this);

foreignCurrencyButton.addActionListener(this);

foreignCurrencyButton.setEnabled(false);

}

java radiobutton重置_Java JRadioButton.setEnabled方法代码示例相关推荐

  1. java secretkey用法_Java SecretKeyFactory.generateSecret方法代码示例

    本文整理汇总了Java中javax.crypto.SecretKeyFactory.generateSecret方法的典型用法代码示例.如果您正苦于以下问题:Java SecretKeyFactory ...

  2. java polygon 用法_Java Polygon.getBounds方法代码示例

    import java.awt.Polygon; //导入方法依赖的package包/类 private SelectionShape translatePointsToRealSize(Select ...

  3. java settext用法_Java JFormattedTextField.setText方法代码示例

    import javax.swing.JFormattedTextField; //导入方法依赖的package包/类 /** * Creates a {@link JFormattedTextFie ...

  4. java makedir用法_Java Files.makeDir方法代码示例

    import org.nutz.lang.Files; //导入方法依赖的package包/类 protected void download(String openid, String media_ ...

  5. java args包_Java Args.positive方法代码示例

    import org.apache.http.util.Args; //导入方法依赖的package包/类 /** * Creates new instance of BHttpConnectionB ...

  6. java shape用法_Java PShape.scale方法代码示例

    import processing.core.PShape; //导入方法依赖的package包/类 public void updateAnim(){ if(pg_src_small == null ...

  7. java round指令_Java PApplet.round方法代码示例

    import processing.core.PApplet; //导入方法依赖的package包/类 public static final void updatePos() { if(follow ...

  8. java gettext用法_Java Context.getText方法代码示例

    import android.content.Context; //导入方法依赖的package包/类 /** * Song Details * * @param context * @param t ...

  9. java soap封装_Java SOAPMessage.writeTo方法代码示例

    import javax.xml.soap.SOAPMessage; //导入方法依赖的package包/类 private byte[] createProbeXML() throws SOAPEx ...

最新文章

  1. Nature最新封面:两大数学难题被AI突破!DeepMind YYDS
  2. 使用CEfSharp之旅(1) 加载网络页面
  3. 更改多维数组的数据结构形式
  4. python自动化测试脚本怎么编写_【Python + uiautomator2】之编写unittest自动化测试脚本...
  5. R 语言下常用第三方库的说明
  6. Data Lake Analytics IP白名单设置攻略
  7. 串口调试助手CRC16_MODBUS校验码计算
  8. 实时数据库之数据采集
  9. php 颜值测试源码,微软小冰颜值测试PHP最新代码
  10. python制作卡通表情包_python——简单生成表情包
  11. 泛微云桥任意文件读取漏洞[尽快升级]
  12. 新冠疫情加速了通信数字化——全球云通信发展分析
  13. 怎么使用黑鲨U盘启动制作U盘系统?
  14. 解决Win10已阻止应用程序访问图形硬件问题(亲测有效)
  15. 全新 Amazon RDS for MySQL 和 PostgreSQL 多可用区部署选项
  16. SAP MM批量删除采购申请、采购订单
  17. android热更新机制
  18. 2021中国农业银行(浙江省分信息科技岗)春招笔试编程题(待更)
  19. Python 数据分析:时间序列
  20. 基于NNEWN NSR3588开发板Android12系统实现四屏异显

热门文章

  1. 美容行业如何提高市场竞争力?
  2. 12:Polly-Rate Limit(限流)
  3. .net 使用Polly进行失败重试
  4. docx 转 doc
  5. win10清理电脑缓存的方法
  6. 母亲骑摩托4千里回家看儿子 为保险女扮男装
  7. Python StringIO模块 实现在内存缓冲区中读写数据
  8. Android Bluetooth蓝牙enable过程
  9. Android基础入门教程——2.4.8 ListView Item多布局的实现
  10. h5 iframe嵌套页面_关于解决iframe标签嵌套问题的解决方法