mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
Button: make icon-only buttons square (no minimum width, smaller left/right insets)
This commit is contained in:
@@ -39,6 +39,7 @@ class BasicComponentsPanel
|
||||
JButton button2 = new JButton();
|
||||
JButton button3 = new JButton();
|
||||
JButton button4 = new JButton();
|
||||
JButton button13 = new JButton();
|
||||
JLabel checkBoxLabel = new JLabel();
|
||||
JCheckBox checkBox1 = new JCheckBox();
|
||||
JCheckBox checkBox2 = new JCheckBox();
|
||||
@@ -169,6 +170,10 @@ class BasicComponentsPanel
|
||||
button4.setEnabled(false);
|
||||
add(button4, "cell 4 1");
|
||||
|
||||
//---- button13 ----
|
||||
button13.setIcon(UIManager.getIcon("Tree.closedIcon"));
|
||||
add(button13, "cell 5 1");
|
||||
|
||||
//---- checkBoxLabel ----
|
||||
checkBoxLabel.setText("JCheckBox");
|
||||
add(checkBoxLabel, "cell 0 2");
|
||||
|
||||
@@ -69,6 +69,12 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 4 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button13"
|
||||
"icon": new com.jformdesigner.model.SwingIcon( 2, "Tree.closedIcon" )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 5 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "checkBoxLabel"
|
||||
"text": "JCheckBox"
|
||||
|
||||
Reference in New Issue
Block a user