HelpButton added

This commit is contained in:
Karl Tauber
2019-09-10 23:46:48 +02:00
parent daf026f8c7
commit b517f64884
13 changed files with 273 additions and 1 deletions

View File

@@ -37,6 +37,8 @@ class BasicComponentsPanel
JLabel buttonLabel = new JLabel();
JButton button1 = new JButton();
JButton button2 = new JButton();
JButton button3 = new JButton();
JButton button4 = new JButton();
JLabel toggleButtonLabel = new JLabel();
JToggleButton toggleButton1 = new JToggleButton();
JToggleButton toggleButton2 = new JToggleButton();
@@ -161,6 +163,17 @@ class BasicComponentsPanel
button2.setEnabled(false);
add(button2, "cell 2 1");
//---- button3 ----
button3.setText("Help");
button3.putClientProperty("JButton.buttonType", "help");
add(button3, "cell 3 1");
//---- button4 ----
button4.setText("Help");
button4.putClientProperty("JButton.buttonType", "help");
button4.setEnabled(false);
add(button4, "cell 4 1");
//---- toggleButtonLabel ----
toggleButtonLabel.setText("JToggleButton:");
add(toggleButtonLabel, "cell 0 2");

View File

@@ -54,6 +54,21 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 2 1"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button3"
"text": "Help"
"$client.JButton.buttonType": "help"
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 1"
} )
add( new FormComponent( "javax.swing.JButton" ) {
name: "button4"
"text": "Help"
"$client.JButton.buttonType": "help"
"enabled": false
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 4 1"
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "toggleButtonLabel"
"text": "JToggleButton:"