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.
如果用户按住鼠标左键,我如何制作将返回布尔值的方法?
您需要实现 MouseListener 并处理MOUSE_PRESSED事件。你可以在这里和这里详细阅读
MOUSE_PRESSED