java swing给按钮添加快捷键

java swing给按钮添加快捷键

//给刷新按钮绑定F5快捷键
		this.btnRefresh.registerKeyboardAction(new ActionRefresh(), KeyStroke.getKeyStroke("F5"), JComponent.WHEN_IN_FOCUSED_WINDOW);


你可能感兴趣的:(java,swing)