Mega Code Archive
By default, the lines are left justified Center the lines
import javax.swing.JButton;
public class Main {
public static void main(String[] argv) throws Exception {
JButton component = new JButton();
component.setToolTipText("" + "This is a" + "
" + "tool tip"
+ "");
}
}