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

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

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

JMenuBar.setBounds介绍

暂无

代码示例

代码示例来源:origin: net.sf.squirrel-sql.plugins/graph

public void setBounds(int x, int y, int width, int height)
 {
   super.setBounds(0, 0, 0, 0);
 }
};

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

JDesktopPane desktopPane = new JDesktopPane();
 tabbedPane.addTab("New tab", null, desktopPane, null);
 JMenuBar menuBar_1 = new JMenuBar();
 menuBar_1.setBounds(0, 0, 441, 21);
 desktopPane.add(menuBar_1);

代码示例来源:origin: net.sf.squirrel-sql.plugins/graph

/**
 * This removes the system menu
 * @return
 */
protected JMenuBar createSystemMenuBar()
{
  menuBar = new JMenuBar()
  {
   public void setSize(int width, int height)
   {
     super.setSize(0,0);
   }
   public void setBounds(int x, int y, int width, int height)
   {
     super.setBounds(0, 0, 0, 0);
   }
  };
  menuBar.setBorderPainted(false);
  menuBar.setSize(0,0);
  menuBar.setBounds(0,0,0,0);
  return menuBar;
}

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

menuBar.setBounds(0, 0, 60, 20);

代码示例来源:origin: com.jtattoo/JTattoo

int mh = menuBar.getPreferredSize().height;
if (leftToRight) {
  menuBar.setBounds(2, (h - mh) / 2, mw, mh);
} else {
  menuBar.setBounds(getWidth() - mw, (h - mh) / 2, mw, mh);

代码示例来源:origin: com.jtattoo/JTattoo

int mh = menuBar.getPreferredSize().height;
if (leftToRight) {
  menuBar.setBounds(2, (h - mh) / 2, mw, mh);
} else {
  menuBar.setBounds(getWidth() - mw, (h - mh) / 2, mw, mh);

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

menuBar.setBounds(0, 0, w, mbd.height);
contentY += mbd.height;

代码示例来源:origin: com.github.insubstantial/substance

menuBar.setBounds(xMenuBar, (getHeight() - iconHeight) / 2, iconWidth, iconHeight);

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf

int y = 3;
if (menuBar != null) {
  menuBar.setBounds(x, y, buttonWidth, buttonHeight);

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf

menuBar.setBounds(x, y, IMAGE_WIDTH, IMAGE_HEIGHT);

代码示例来源:origin: org.gephi/desktop-banner

JMenuBar menu = rootPane.getJMenuBar();
Dimension size = menu.getPreferredSize();
menu.setBounds(x, y, w, size.height);
y += size.height;

代码示例来源:origin: nl.cloudfarming.client/menu

JMenuBar menu = rootPane.getJMenuBar();
Dimension size = menu.getPreferredSize();
menu.setBounds(x, y, w, size.height);
y += size.height;

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf

int atrX = 0;
menuBar.setBounds(atlX, (getHeight() - 16) / 2, 16, 16);
atlX += 18;

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf

root.getJMenuBar().setBounds(0, nextY, w, mbd.height);
nextY += mbd.height;

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf

root.getJMenuBar().setBounds(0, nextY, w, mbd.height);
nextY += mbd.height;

代码示例来源:origin: com.jtattoo/JTattoo

root.getJMenuBar().setBounds(0, nextY, w, mbd.height);
nextY += mbd.height;

代码示例来源:origin: com.github.insubstantial/substance

root.getJMenuBar().setBounds(0, nextY, w, mbd.height);
nextY += mbd.height;

代码示例来源:origin: org.java.net.substance/substance

root.getJMenuBar().setBounds(0, nextY, w, mbd.height);
nextY += mbd.height;

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf

root.getMenuBar().setBounds(0, nextY, w, mbd.height);
nextY += mbd.height;

代码示例来源:origin: khuxtable/seaglass

Dimension mbd         = root.getJMenuBar().getPreferredSize();
int x = menuInTitle? 20 : 0;
root.getJMenuBar().setBounds(x, menuInTitle ? 0 : nextY, w, mbd.height);
root.getJMenuBar().setOpaque(false);
root.getJMenuBar().setBackground(transparentColor);

相关文章