Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想为应用程序进行junit测试,具有图形编辑器之类的功能。即用户可以在 GUI 中平滑地拖放鼠标。以编程方式编写坐标运动似乎没有用。是否可以进行一些宏录制,以捕获用户来宾然后将其用于测试?
也许你可以使用 AWTEventListener 来完成这个任务。
可能重复检测鼠标进入/退出事件在 JPanel 上的任何位置
或者你可以参考java2.com 的例子。