Java Tips: A JButton tooltip example

Java/Swing FAQ: How do I set the help text (i.e., help text, balloon text, tooltip text) on a JButton?
Just call the setToolTipText method on the JButton. Here's a quick JButton tooltip display example:
// create a button with tooltip help text
JButton button = new JButton("Click Me");
button.setToolTipText("Click this button to make something happen.");


References:
http://alvinalexander.com/blog/post/jfc-swing/how-set-help-tooltip-balloon-text-jbutton











Comments

Popular posts from this blog

gspread error:gspread.exceptions.SpreadsheetNotFound

Miniconda installation problem: concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.

转载:彻底搞清楚promoter, exon, intron, and UTR