Set of get ToolTip for JTextField - Java Swing

Java examples for Swing:JTextField

Description

Set of get ToolTip for JTextField

Demo Code


import java.awt.FlowLayout;
import javax.swing.JApplet;
import javax.swing.JTextField;
 
public class Main {
        public void init(){
                JTextField field = new JTextField("",20);
                field.setToolTipText("This is JTextField's ToolTip");
                String toolTip = field.getToolTipText();
               /*ww w .  ja  v  a 2 s. c o m*/
        }
}

Related Tutorials