javax.swing.JButton.getMaximumSize()方法的使用及代码示例

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

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

JButton.getMaximumSize介绍

暂无

代码示例

代码示例来源:origin: org.appdapter/org.appdapter.lib.gui

public Dimension getMaximumSize() {
    Dimension dim = super.getMaximumSize();
    return new Dimension(Short.MAX_VALUE, (int) dim.getHeight());
  }
};

代码示例来源:origin: stackoverflow.com

example.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
JButton findNext = new JButton("Find Next");
JButton cancel = new JButton("Cancel");
Dimension d = findNext.getMaximumSize();
cancel.setMaximumSize(new Dimension(d));
example.add(findNext);
example.add(cancel);

代码示例来源:origin: com.eas.platypus/platypus-js-common-utils

@Override
public Dimension getMaximumSize() {
  Dimension sMax = super.getMaximumSize();
  Dimension pref = getPreferredSize();
  return new Dimension(Math.max(sMax.width, pref.width), sMax.height);
}

代码示例来源:origin: org.cytoscape/network-analyzer-impl

/**
 * Resizes the given buttons making them equal in size.
 * <p>
 * The sizes of the buttons are equalized only by enlarging their widths and heights (when necessary).
 * </p>
 * 
 * @param aButtons
 *            Array of buttons to be made equal size.
 * 
 * @throws NullPointerException
 *             If <code>aButtons</code> is <code>null</code>.
 */
public static void equalizeSize(JButton[] aButtons) {
  final Dimension preferredSize = aButtons[0].getPreferredSize();
  final Dimension maximumSize = aButtons[0].getMaximumSize();
  for (int i = 1; i < aButtons.length; ++i) {
    ensureSize(preferredSize, aButtons[i].getPreferredSize());
    ensureSize(maximumSize, aButtons[i].getMaximumSize());
  }
  setSizes(aButtons, preferredSize, maximumSize);
}

代码示例来源:origin: net.sourceforge.jadex/jadex-runtimetools-swing

closeb.setMaximumSize(refreshb.getMaximumSize());
closeb.setPreferredSize(refreshb.getPreferredSize());
closeb.setMinimumSize(refreshb.getMinimumSize());

代码示例来源:origin: org.activecomponents.jadex/jadex-runtimetools-swing

closeb.setMaximumSize(refreshb.getMaximumSize());
closeb.setPreferredSize(refreshb.getPreferredSize());
closeb.setMinimumSize(refreshb.getMinimumSize());

代码示例来源:origin: org.activecomponents.jadex/jadex-runtimetools-swing

refresh.setPreferredSize(refresh.getPreferredSize());
refresh.setMinimumSize(refresh.getMinimumSize());
refresh.setMaximumSize(refresh.getMaximumSize());
refresh.setToolTipText("Refresh the panel.");

代码示例来源:origin: net.sourceforge.jadex/jadex-runtimetools-swing

refresh.setPreferredSize(refresh.getPreferredSize());
refresh.setMinimumSize(refresh.getMinimumSize());
refresh.setMaximumSize(refresh.getMaximumSize());
refresh.setToolTipText("Refresh the panel.");

代码示例来源:origin: org.activecomponents.jadex/jadex-runtimetools-swing

JButton buava = new JButton("...");
buava.setMinimumSize(bunick.getMinimumSize());
buava.setMaximumSize(bunick.getMaximumSize());
buava.setPreferredSize(bunick.getPreferredSize());
JPanel apan = new JPanel(new BorderLayout());
final JButton jbut = new JButton("...");
jbut.setMinimumSize(bunick.getMinimumSize());
jbut.setMaximumSize(bunick.getMaximumSize());
jbut.setPreferredSize(bunick.getPreferredSize());
final JButton playbut = new JButton(icons.getIcon("play"));
playbut.setMinimumSize(bunick.getMinimumSize());
playbut.setMaximumSize(bunick.getMaximumSize());
playbut.setPreferredSize(bunick.getPreferredSize());
jcom.addItemListener(new ItemListener()

代码示例来源:origin: net.sourceforge.jadex/jadex-runtimetools-swing

JButton buava = new JButton("...");
buava.setMinimumSize(bunick.getMinimumSize());
buava.setMaximumSize(bunick.getMaximumSize());
buava.setPreferredSize(bunick.getPreferredSize());
JPanel apan = new JPanel(new BorderLayout());
final JButton jbut = new JButton("...");
jbut.setMinimumSize(bunick.getMinimumSize());
jbut.setMaximumSize(bunick.getMaximumSize());
jbut.setPreferredSize(bunick.getPreferredSize());
final JButton playbut = new JButton(icons.getIcon("play"));
playbut.setMinimumSize(bunick.getMinimumSize());
playbut.setMaximumSize(bunick.getMaximumSize());
playbut.setPreferredSize(bunick.getPreferredSize());
jcom.addItemListener(new ItemListener()

相关文章

JButton类方法