Button and ToggleButton: support round button style (set client property JButton.buttonType to roundRect)

This commit is contained in:
Karl Tauber
2020-05-13 11:45:01 +02:00
parent 5bd40baed2
commit b3e0b99e8d
8 changed files with 333 additions and 32 deletions

View File

@@ -179,9 +179,8 @@ class BasicComponentsPanel
add(button5, "cell 3 1");
//---- button6 ----
button6.setText("square");
button6.setEnabled(false);
button6.putClientProperty("JButton.buttonType", "square");
button6.setText("round");
button6.putClientProperty("JButton.buttonType", "roundRect");
add(button6, "cell 4 1");
//---- button3 ----

View File

@@ -1,4 +1,4 @@
JFDML JFormDesigner: "7.0.0.0.194" Java: "13.0.1" encoding: "UTF-8"
JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
@@ -63,9 +63,8 @@ new FormModel {
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button6"
"text": "square"
"enabled": false
"$client.JButton.buttonType": "square"
"text": "round"
"$client.JButton.buttonType": "roundRect"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 1"
} )