向系统注册快捷键  没有用过!我是采鸟!

解决方案 »

  1.   

    知道的re一下,我现在已经火烧眉毛了
      

  2.   

    定义快捷键:
    openAction=new FileAction("打开",KeyStroke.getKeyStroke('O',Event.CTRL_MASK),icon);static class FileAction extends AbstractAction{

    FileAction(String name){
    super(name);
    }

    FileAction(String name,KeyStroke keystroke){
    this(name);
    if(keystroke!=null){
    putValue(ACCELERATOR_KEY,keystroke);
    }
    }

    FileAction(String name,Icon icon){
    super(name,icon);
    if(icon!=null){
    putValue(SMALL_ICON,icon);
    }
    }

    FileAction(String name,KeyStroke keystroke,Icon icon){
    this(name,icon);
    if(keystroke!=null){
    putValue(ACCELERATOR_KEY,keystroke);
    }
    }
            .........
    }