开发者

Accelerator for JButton

开发者 https://www.devze.com 2023-02-02 23:45 出处:网络
How do set a shortcut, eg. Ctrl+Q, to a 开发者_如何转开发JButton? JMenuItem has setAccelerator() method to set one, but JButton doesn\'t.Well, you can do a JMenu with a set og instruction, putting ins

How do set a shortcut, eg. Ctrl+Q, to a 开发者_如何转开发JButton? JMenuItem has setAccelerator() method to set one, but JButton doesn't.


Well, you can do a JMenu with a set og instruction, putting inside them the same ActionPerformed you put in the specified JButton. It's a good trade-off

0

精彩评论

暂无评论...
验证码 换一张
取 消