Tooltip stealing mouse events
问题 When I have buttons near the button of the screen, the tooltip appears underneath the mouse. Clicking will then make the tooltip disappear, instead of clicking the button. public static void main(String[] args) { JFrame frame = new JFrame("Test"); JButton button = new JButton("Test"); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { System.out.println("action performed"); } }); button.setToolTipText("Sample tooltip text"); frame.add(button); frame