import java.awt.Point;
import java.awt.event.MouseEvent;
import javax.swing.JButton;
publicclass Main {
publicstaticvoid main(String[] argv) throws Exception {
JButton button = new JButton("My Button") {
public Point getToolTipLocation(MouseEvent event) {
return null;
}
};
// Set the tool tip text
button.setToolTipText("aString");
}
}