Mega Code Archive

 
Categories / Java / Swing JFC
 

Setting a Tool Tip

import javax.swing.JButton; import javax.swing.JComponent; public class Main {   public static void main(String[] argv) throws Exception {     JComponent button = new JButton("Label");     // Set tool tip text     button.setToolTipText("tool tip text");   } }