Button and TextComponent: support per component minimum width

This commit is contained in:
Karl Tauber
2020-01-08 14:47:40 +01:00
parent dfccabc2b9
commit 3f3884193d
12 changed files with 27 additions and 1 deletions

View File

@@ -258,6 +258,7 @@ public class FlatComponentsTest
//---- button17 ----
button17.setText("square");
button17.putClientProperty("JButton.buttonType", "square");
button17.putClientProperty("JComponent.minimumWidth", 0);
add(button17, "cell 1 1");
//---- button2 ----
@@ -271,6 +272,7 @@ public class FlatComponentsTest
button18.setText("square");
button18.putClientProperty("JButton.buttonType", "square");
button18.setEnabled(false);
button18.putClientProperty("JComponent.minimumWidth", 0);
add(button18, "cell 2 1");
//---- button5 ----

View File

@@ -51,6 +51,7 @@ new FormModel {
name: "button17"
"text": "square"
"$client.JButton.buttonType": "square"
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 1 1"
} )
@@ -68,6 +69,7 @@ new FormModel {
"text": "square"
"$client.JButton.buttonType": "square"
"enabled": false
"$client.JComponent.minimumWidth": 0
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 1"
} )