diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties index 6535c667..7abfa360 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -188,6 +188,11 @@ TableHeader.separatorColor=585858 TableHeader.bottomSeparatorColor=585858 +#---- ToolTip ---- + +ToolTip.background=4b4d4d + + #---- Tree ---- Tree.background=@textComponentBackground diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties index ad6df996..d7ff3ef2 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -45,6 +45,7 @@ TableHeaderUI=com.formdev.flatlaf.ui.FlatTableHeaderUI TextAreaUI=com.formdev.flatlaf.ui.FlatTextAreaUI TextFieldUI=com.formdev.flatlaf.ui.FlatTextFieldUI TextPaneUI=com.formdev.flatlaf.ui.FlatTextPaneUI +ToolTipUI=javax.swing.plaf.basic.BasicToolTipUI TreeUI=com.formdev.flatlaf.ui.FlatTreeUI ViewportUI=com.formdev.flatlaf.ui.FlatViewportUI @@ -258,6 +259,11 @@ TextPane.background=@textComponentBackground TextPane.margin=@textComponentMargin +#---- ToolTip ---- + +ToolTip.border=2,6,2,6,@@Component.borderColor + + #---- Tree ---- Tree.border=1,1,1,1 diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties index c5736928..1ec439d6 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -188,6 +188,11 @@ TableHeader.separatorColor=e5e5e5 TableHeader.bottomSeparatorColor=e5e5e5 +#---- ToolTip ---- + +ToolTip.background=f7f7f7 + + #---- Tree ---- Tree.background=@textComponentBackground diff --git a/flatlaf-core/src/test/java/com/formdev/flatlaf/FlatComponentsTest.java b/flatlaf-core/src/test/java/com/formdev/flatlaf/FlatComponentsTest.java index 6212b13d..75a8ed0d 100644 --- a/flatlaf-core/src/test/java/com/formdev/flatlaf/FlatComponentsTest.java +++ b/flatlaf-core/src/test/java/com/formdev/flatlaf/FlatComponentsTest.java @@ -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 } diff --git a/flatlaf-core/src/test/java/com/formdev/flatlaf/FlatComponentsTest.jfd b/flatlaf-core/src/test/java/com/formdev/flatlaf/FlatComponentsTest.jfd index bfe3d553..635c87e3 100644 --- a/flatlaf-core/src/test/java/com/formdev/flatlaf/FlatComponentsTest.jfd +++ b/flatlaf-core/src/test/java/com/formdev/flatlaf/FlatComponentsTest.jfd @@ -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 ) diff --git a/flatlaf-core/src/test/resources/com/formdev/flatlaf/FlatTestLaf.properties b/flatlaf-core/src/test/resources/com/formdev/flatlaf/FlatTestLaf.properties index c68d3f9a..21cec0b6 100644 --- a/flatlaf-core/src/test/resources/com/formdev/flatlaf/FlatTestLaf.properties +++ b/flatlaf-core/src/test/resources/com/formdev/flatlaf/FlatTestLaf.properties @@ -197,6 +197,11 @@ TableHeader.separatorColor=00ff00 TableHeader.bottomSeparatorColor=00ff00 +#---- ToolTip ---- + +ToolTip.background=eeeeff + + #---- Tree ---- Tree.background=fff0ff