开发者

Java: keyboard shortcut (mnemonic) for a Component

I have a JFrame and some JButto开发者_高级运维ns, JLabels and a JTextfield. I need to create a keyboard shortcut so that when it is pressed, the JTextfield gets the focus.

How can I do this?

Thanks


Maybe you are looking for:

label.setLabelFor( textField );

Otherwise you need to use Key Bindings.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜