没有鼠标的一天(Java 键盘快捷键)
今天,我决定做出一项决议,其中包括仅使用键盘测试我的Java应用程序。
但我面临一些障碍:
- 如何使用键盘选择/取消选择复选框?
- 如何折叠/展开 JTree 中的项目?
非常感谢所有帮助!
更新:
这是我要选择的复选框的示例:
PS: 空间不起作用
Today I decide to make a resolution which consist of testing my Java application using the keyboard solely.
But I am faced with some obstacles:
- How do you select/deselect a checkbox using the keyboard?
- How do you collapse/expand items in a
JTree
?
All help will be much appreciated!
UPDATE:
Here is an example of a checkbox I want to select:
PS: space didn't work
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要回答问题#2,您可以按小键盘上的 - 和 + 键,或使用 ← 和 → 箭头键折叠和展开树。
To answer question #2, you can either press - and + keys from the NUMPAD, or use ← and → arrow keys to collapse and expand trees.