public void setBounds(int x, int y, int width, int height) { super.setBounds(0, 0, 0, 0); } };
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);
/** * 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; }
menuBar.setBounds(0, 0, 60, 20);
menuBar.setBounds(0, 0, w, mbd.height); contentY += mbd.height;
menuBar.setBounds(xMenuBar, (getHeight() - iconHeight) / 2, iconWidth, iconHeight);
int y = 3; if (menuBar != null) { menuBar.setBounds(x, y, buttonWidth, buttonHeight);
menuBar.setBounds(x, y, IMAGE_WIDTH, IMAGE_HEIGHT);
JMenuBar menu = rootPane.getJMenuBar(); Dimension size = menu.getPreferredSize(); menu.setBounds(x, y, w, size.height); y += size.height;
JMenuBar menu = rootPane.getJMenuBar(); Dimension size = menu.getPreferredSize(); menu.setBounds(x, y, w, size.height); y += size.height;
int atrX = 0; menuBar.setBounds(atlX, (getHeight() - 16) / 2, 16, 16); atlX += 18;
root.getJMenuBar().setBounds(0, nextY, w, mbd.height); nextY += mbd.height;
root.getJMenuBar().setBounds(0, nextY, w, mbd.height); nextY += mbd.height;
root.getJMenuBar().setBounds(0, nextY, w, mbd.height); nextY += mbd.height;
root.getJMenuBar().setBounds(0, nextY, w, mbd.height); nextY += mbd.height;
root.getJMenuBar().setBounds(0, nextY, w, mbd.height); nextY += mbd.height;
root.getMenuBar().setBounds(0, nextY, w, mbd.height); nextY += mbd.height;
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);