mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 15:07:11 -06:00
TextField implemented
This commit is contained in:
@@ -66,6 +66,11 @@ public class FlatComponentsTest
|
||||
JRadioButton radioButton2 = new JRadioButton();
|
||||
JRadioButton radioButton3 = new JRadioButton();
|
||||
JRadioButton radioButton4 = new JRadioButton();
|
||||
JLabel textFieldLabel = new JLabel();
|
||||
JTextField textField1 = new JTextField();
|
||||
JTextField textField2 = new JTextField();
|
||||
JTextField textField3 = new JTextField();
|
||||
JTextField textField4 = new JTextField();
|
||||
|
||||
//======== this ========
|
||||
setLayout(new MigLayout(
|
||||
@@ -177,6 +182,30 @@ public class FlatComponentsTest
|
||||
radioButton4.setSelected(true);
|
||||
radioButton4.setEnabled(false);
|
||||
add(radioButton4, "cell 4 3");
|
||||
|
||||
//---- textFieldLabel ----
|
||||
textFieldLabel.setText("JTextField:");
|
||||
add(textFieldLabel, "cell 0 4");
|
||||
|
||||
//---- textField1 ----
|
||||
textField1.setText("editable");
|
||||
add(textField1, "cell 1 4,growx");
|
||||
|
||||
//---- textField2 ----
|
||||
textField2.setText("disabled");
|
||||
textField2.setEnabled(false);
|
||||
add(textField2, "cell 2 4,growx");
|
||||
|
||||
//---- textField3 ----
|
||||
textField3.setText("not editable");
|
||||
textField3.setEditable(false);
|
||||
add(textField3, "cell 3 4,growx");
|
||||
|
||||
//---- textField4 ----
|
||||
textField4.setText("not editable disabled");
|
||||
textField4.setEnabled(false);
|
||||
textField4.setEditable(false);
|
||||
add(textField4, "cell 4 4,growx");
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
||||
}
|
||||
|
||||
|
||||
@@ -144,6 +144,40 @@ new FormModel {
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 4 3"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "textFieldLabel"
|
||||
"text": "JTextField:"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 4"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "textField1"
|
||||
"text": "editable"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 4,growx"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "textField2"
|
||||
"text": "disabled"
|
||||
"enabled": false
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 2 4,growx"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "textField3"
|
||||
"text": "not editable"
|
||||
"editable": false
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 3 4,growx"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "textField4"
|
||||
"text": "not editable disabled"
|
||||
"enabled": false
|
||||
"editable": false
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 4 4,growx"
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 580, 300 )
|
||||
|
||||
@@ -55,6 +55,9 @@ CheckBox.icon.disabledCheckmarkColor=ABABAB
|
||||
|
||||
#---- Component ----
|
||||
|
||||
Component.borderColor=ff0000
|
||||
Component.disabledBorderColor=000088
|
||||
Component.focusedBorderColor=466d94
|
||||
Component.focusColor=97c3f3
|
||||
#Component.focusWidth=5
|
||||
#Component.arc=8
|
||||
@@ -64,3 +67,9 @@ Component.focusColor=97c3f3
|
||||
|
||||
Label.foreground=008800
|
||||
Label.disabledForeground=000088
|
||||
|
||||
|
||||
#---- TextField ----
|
||||
|
||||
TextField.background=ffffff
|
||||
TextField.disabledBackground=f2f2f2
|
||||
|
||||
Reference in New Issue
Block a user