ToolTip implementation

This commit is contained in:
Karl Tauber
2019-09-04 10:18:29 +02:00
parent 5f43740484
commit a15e21b6c1
6 changed files with 45 additions and 1 deletions

View File

@@ -140,6 +140,8 @@ public class FlatComponentsTest
progressBar1 = new JProgressBar();
progressBar2 = new JProgressBar();
indeterminateCheckBox = new JCheckBox();
JLabel toolTipLabel = new JLabel();
JToolTip toolTip1 = new JToolTip();
//======== this ========
setLayout(new MigLayout(
@@ -170,6 +172,7 @@ public class FlatComponentsTest
"[]" +
"[]" +
"[]" +
"[]" +
"[]"));
//---- labelLabel ----
@@ -675,6 +678,14 @@ public class FlatComponentsTest
indeterminateCheckBox.setText("indeterminate");
indeterminateCheckBox.addActionListener(e -> indeterminateCheckBoxActionPerformed());
add(indeterminateCheckBox, "cell 4 18");
//---- toolTipLabel ----
toolTipLabel.setText("JToolTip:");
add(toolTipLabel, "cell 0 19");
//---- toolTip1 ----
toolTip1.setTipText("Some text in tool tip.");
add(toolTip1, "cell 1 19 3 1");
// JFormDesigner - End of component initialization //GEN-END:initComponents
}

View File

@@ -9,7 +9,7 @@ new FormModel {
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets 0,hidemode 3,gap 5 5,ltr"
"$columnConstraints": "[][][][][][]"
"$rowConstraints": "[][][][][][][][][][][][][][][][][][][]"
"$rowConstraints": "[][][][][][][][][][][][][][][][][][][][]"
} ) {
name: "this"
add( new FormComponent( "javax.swing.JLabel" ) {
@@ -678,6 +678,18 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 18"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "toolTipLabel"
"text": "JToolTip:"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 0 19"
} )
add( new FormComponent( "javax.swing.JToolTip" ) {
name: "toolTip1"
"tipText": "Some text in tool tip."
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 19 3 1"
} )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
"size": new java.awt.Dimension( 790, 715 )

View File

@@ -197,6 +197,11 @@ TableHeader.separatorColor=00ff00
TableHeader.bottomSeparatorColor=00ff00
#---- ToolTip ----
ToolTip.background=eeeeff
#---- Tree ----
Tree.background=fff0ff