先给出两个控制方法 1、显示tooltip public static void postToolTip(JComponent comp) { Action action = comp.getActionMap().get("postTip"); if (action == null) // no tooltip return; ActionEvent ae = new ActionEvent(comp, ActionEvent.ACTION_PERFORMED, "postTip", EventQueue.getMostRecentEventTime(), 0); action.actionPerformed(ae); } 2、隐藏tooltip public static void hideToolTip(JComponent comp) { Action action = comp.getActionMap().get("hideTip"); if (action == null) // no tooltip return; ActionEvent ae = new ActionEvent(...