javax.swing.JMenu.addActionListener()方法的使用及代码示例

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

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

JMenu.addActionListener介绍

暂无

代码示例

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

JMenu menu = new JMenu("MyMenu");
menu.addActionListener(new ActionListener(){...});

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

public void addSubMenu(JMenu _m, boolean _enabled) {
 _m.setEnabled(_enabled);
 _m.addActionListener(this);
 this.add(_m);
}

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

public void addSubMenu(JMenu _m, boolean _enabled)
{
 _m.setEnabled(_enabled);
 _m.addActionListener(this);
 this.add(_m);
}

代码示例来源:origin: de.dfki.mary/marytts-client

optionsMenu.addActionListener(new java.awt.event.ActionListener() {
  public void actionPerformed(java.awt.event.ActionEvent evt) {
    optionsMenuActionPerformed(evt);

代码示例来源:origin: net.java.dev.jets3t/jets3t

loginSwitchMenu.addActionListener(this);
serviceMenu.add(new JSeparator());
guiUtils.applyIcon(loginSwitchMenu, "/images/nuvola/16x16/actions/connect_established.png");

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

loginSwitchMenu.addActionListener(this);
serviceMenu.add(new JSeparator());
guiUtils.applyIcon(loginSwitchMenu, "/images/nuvola/16x16/actions/connect_established.png");

代码示例来源:origin: digital-preservation/droid

jMenuFile.setText("File");
jMenuFile.setActionCommand("file");
jMenuFile.addActionListener(new java.awt.event.ActionListener() {
  public void actionPerformed(java.awt.event.ActionEvent evt) {
    jMenuFileActionPerformed(evt);
jMenuTools.addActionListener(new java.awt.event.ActionListener() {
  public void actionPerformed(java.awt.event.ActionEvent evt) {
    jMenuToolsActionPerformed(evt);

代码示例来源:origin: jpcsp/jpcsp

mDebug.addActionListener(new java.awt.event.ActionListener() {
  public void actionPerformed(java.awt.event.ActionEvent evt) {
    RunDebuggerActionPerformed(evt);

代码示例来源:origin: uk.gov.nationalarchives/droid-ui

jMenuFile.setText("File");
jMenuFile.setActionCommand("file");
jMenuFile.addActionListener(new java.awt.event.ActionListener() {
  public void actionPerformed(java.awt.event.ActionEvent evt) {
    jMenuFileActionPerformed(evt);
jMenuTools.addActionListener(new java.awt.event.ActionListener() {
  public void actionPerformed(java.awt.event.ActionEvent evt) {
    jMenuToolsActionPerformed(evt);

代码示例来源:origin: chatty/chatty

main.addActionListener(actionListener);
view.addActionListener(actionListener);
channels.addActionListener(actionListener);
channels.addMenuListener((MenuListener)itemListener);
srl.addActionListener(actionListener);
extra.addActionListener(actionListener);
help.addActionListener(actionListener);

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

public /*synchronized*/ void addMenu(JMenu _menu)
{
 //SwingUtilities.updateComponentTreeUI(_menu);
 int n=getSubElements().length;
 if(n>=2)
 {
  n-=2;
  Component fm=getComponent(n  ); // Fenetres
  Component hm=getComponent(n+1); // Aide
  remove(hm);
  remove(fm);
  add(_menu);
  add(fm);
  add(hm);
  /*
 add(_menu,n  );
 add(fm   ,n+1);
 add(hm   ,n+2);
  */
 }
 else add(_menu);
 _menu.setIcon(null);
 _menu.addActionListener(this);
}

代码示例来源:origin: igniterealtime/Spark

statusMenu.addActionListener(new AbstractAction() {
private static final long serialVersionUID = 1L;

代码示例来源:origin: org.fudaa.soft.fudaa-refonde/refonde-client

mn= buildFileMenu();
mn.setIcon(null);
mn.addActionListener(mb);
mb.add(mn, 0);
mn= buildEditionMenu();
mn.setIcon(null);
mn.addActionListener(mb);
mb.add(mn, 1);
mn.addActionListener(mb);
mb.add(mn, 2);
mn.addActionListener(mb);
mb.add(mn, 3);
mn.addActionListener(mb);
mb.add(mn, 4);
mn.addActionListener(mb);
mb.add(mn, 5);
mn.addActionListener(mb);
mb.add(mn, 6);
mb.computeMnemonics();

相关文章