javax.swing.JToggleButton.setBounds()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(130)

本文整理了Java中javax.swing.JToggleButton.setBounds()方法的一些代码示例,展示了JToggleButton.setBounds()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JToggleButton.setBounds()方法的具体详情如下:
包路径:javax.swing.JToggleButton
类名称:JToggleButton
方法名:setBounds

JToggleButton.setBounds介绍

暂无

代码示例

代码示例来源:origin: xyz.cofe/docking-frames-ext-toolbar

@Override
public void layoutContainer( Container parent ){
  if (parent.getComponentCount() == 2){
    int width = parent.getWidth();
    int height = parent.getHeight();
    Dimension preferred = elsewhere.getPreferredSize();
    int labelWidth = Math.min(preferred.width, width - 1);
    int labelHeight = Math.min(preferred.height, height - 1);
    button.setBounds(labelWidth + 2, 0, width - labelWidth - 2, height);
    elsewhere.setBounds(1, 0, labelWidth,
        labelHeight);
  }
}

代码示例来源:origin: Slowpoke101/FTBLaunch

tglbtnForceUpdate.setBounds(147, 48, 629, 29);
tglbtnForceUpdate.addActionListener(new ActionListener() {
  @Override

代码示例来源:origin: net.java.dev.laf-widget/laf-widget

int sbWidth = this.searchPanel.searchButton.getPreferredSize().width;
int sbHeight = this.searchPanel.searchButton.getPreferredSize().height;
this.searchPanel.searchButton.setBounds(x,
    (height - sbHeight) / 2, sbWidth, sbHeight);
int sbWidth = this.searchPanel.searchButton.getPreferredSize().width;
int sbHeight = this.searchPanel.searchButton.getPreferredSize().height;
this.searchPanel.searchButton.setBounds(x - sbWidth,
    (height - sbHeight) / 2, sbWidth, sbHeight);

相关文章

JToggleButton类方法