本文整理了Java中javax.swing.JMenuBar.setAlignmentX()
方法的一些代码示例,展示了JMenuBar.setAlignmentX()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenuBar.setAlignmentX()
方法的具体详情如下:
包路径:javax.swing.JMenuBar
类名称:JMenuBar
方法名:setAlignmentX
暂无
代码示例来源:origin: freeplane/freeplane
private void insertSubmenus(final JToolBar iconToolBar) {
final JMenuBar iconMenuBar = new JMenuBar() {
private static final long serialVersionUID = 1L;
@Override
public Dimension getMaximumSize() {
final Dimension preferredSize = getPreferredSize();
return new Dimension(Short.MAX_VALUE, preferredSize.height);
}
};
iconMenuBar.setAlignmentX(JComponent.CENTER_ALIGNMENT);
iconMenuBar.setLayout(new GridLayout(0, 1));
for (final IconGroup iconGroup : STORE.getGroups()) {
iconMenuBar.add(getSubmenu(iconGroup));
}
iconToolBar.add(iconMenuBar);
}
代码示例来源:origin: edu.toronto.cs.savant/savant-core
bottombar.setAlignmentX(RIGHT_ALIGNMENT);
bottombar.add(Box.createHorizontalGlue());
代码示例来源:origin: edu.toronto.cs.savant/savant-core
bottombar.setAlignmentX(RIGHT_ALIGNMENT);
bottombar.add(Box.createHorizontalGlue());
JButton openbutt = new JButton("Load Track");
内容来源于网络,如有侵权,请联系作者删除!