我的doc版本是Java platform SE 6.
下面两句是什么意思呢?jmenuFile.setMnemonic(KeyEvent.VK_F);jmenuitemExit.setAccelerator(KeyStroke.ge

解决方案 »

  1.   


    jmenuitemExit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X,ActionEvent.CTRL_MASK));
      

  2.   

    javax.swing.JMenuItem的父类javax.swing.AbstractButton里面有setMnemonic的啊。Sets the keyboard mnemonic on the current model. The mnemonic is the key which when combined with the look and feel's mouseless modifier (usually Alt) will activate this button if focus is contained somewhere within this button's ancestor window.
    ......
    getContentPane在javax.swing.JFrame里面。
    还有在,javax.swing.JDialog javax.swing.JInternalFrame javax.swing.JRootPane javax.swing.JWindow
    里面都有,还有javax.swing.RootPaneContainer这个interface。
     
      

  3.   

    随便点开一个文档,在最上面一排倒数第二个有“Index(索引)”链接点进去后进入索引页面,要找 setMnemonic 的话,点 S 链接,再使用浏览器或者是 CHM 的查找功能
    查“setMnemonic”就可以找到了,方法命名有很多重载的可以根据需要查看。
      

  4.   

    要么是索引的问题,要么就是你的api不全,请问是英文的还是中文的?