multi-line ToolTip

This commit is contained in:
Karl Tauber
2019-09-21 18:12:58 +02:00
parent 91f304054e
commit e004401772
5 changed files with 104 additions and 2 deletions

View File

@@ -156,6 +156,7 @@ public class FlatComponentsTest
indeterminateCheckBox = new JCheckBox();
JLabel toolTipLabel = new JLabel();
JToolTip toolTip1 = new JToolTip();
JToolTip toolTip2 = new JToolTip();
JLabel toolBarLabel = new JLabel();
JToolBar toolBar1 = new JToolBar();
JButton button4 = new JButton();
@@ -775,6 +776,10 @@ public class FlatComponentsTest
toolTip1.setTipText("Some text in tool tip.");
add(toolTip1, "cell 1 20 3 1");
//---- toolTip2 ----
toolTip2.setTipText("Tool tip with\nmultiple\nlines.");
add(toolTip2, "cell 1 20 3 1");
//---- toolBarLabel ----
toolBarLabel.setText("JToolBar:");
add(toolBarLabel, "cell 0 21");

View File

@@ -770,6 +770,12 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 20 3 1"
} )
add( new FormComponent( "javax.swing.JToolTip" ) {
name: "toolTip2"
"tipText": "Tool tip with\nmultiple\nlines."
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 20 3 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "toolBarLabel"
"text": "JToolBar:"