本文整理了Java中javax.swing.JInternalFrame.setJMenuBar()
方法的一些代码示例,展示了JInternalFrame.setJMenuBar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JInternalFrame.setJMenuBar()
方法的具体详情如下:
包路径:javax.swing.JInternalFrame
类名称:JInternalFrame
方法名:setJMenuBar
暂无
代码示例来源:origin: stackoverflow.com
JInternalFrame jInternalFrame = new JInternalFrame();
jMenuBar = new javax.swing.JMenuBar();
jMenu1 = new JMenu("Save");
jMenu2 = new JMenu("Open");
jMenuBar.add(jMenu1);
jMenuBar.add(jMenu2);
jInternalFrame.setJMenuBar(jMenuBar);
tabbedPane.addTab("tab3", jInternalFrame);
代码示例来源:origin: stackoverflow.com
setJMenuBar(menubar);
label.setHorizontalAlignment(JLabel.CENTER);
label.setVerticalAlignment(JLabel.CENTER);
代码示例来源:origin: org.xworker/xworker_core
public static void createJMenuBar(ActionContext actionContext){
Thing self = (Thing) actionContext.get("self");
JInternalFrame parent = (JInternalFrame) actionContext.get("parent");
for(Thing child : self.getChilds()){
JMenuBar c = (JMenuBar) child.doAction("create", actionContext);
if(c != null){
parent.setJMenuBar(c);
break;
}
}
}
代码示例来源:origin: org.scijava/scijava-ui-swing
@Override
protected void setupConsole() {
final JInternalFrame frame = new JInternalFrame("Console");
desktopPane.add(frame);
frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
frame.setContentPane(getConsolePane().getComponent());
frame.setJMenuBar(createConsoleMenu());
frame.pack();
getConsolePane().setWindow(frame);
}
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
@Override
public void hide(View v) {
if (v.isShowing()) {
JInternalFrame f = (JInternalFrame) SwingUtilities.getRootPane(v.getComponent()).getParent();
if (getActiveView() == v) {
setActiveView(null);
}
f.setVisible(false);
f.remove(v.getComponent());
// Setting the JMenuBar to null triggers action disposal of
// actions in the openRecentMenu and the windowMenu. This is
// important to prevent memory leaks.
f.setJMenuBar(null);
desktopPane.remove(f);
f.dispose();
}
}
内容来源于网络,如有侵权,请联系作者删除!