mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 06:57:13 -06:00
ComboBox: no longer ignore JComboBox.prototypeDisplayValue when computing popup width (issue #80)
This commit is contained in:
@@ -513,14 +513,13 @@ public class FlatComponentsTest
|
||||
add(comboBox4, "cell 4 5,growx");
|
||||
|
||||
//---- comboBox5 ----
|
||||
comboBox5.setPrototypeDisplayValue("12345");
|
||||
comboBox5.setModel(new DefaultComboBoxModel<>(new String[] {
|
||||
"wide popup if text is longer",
|
||||
"aa",
|
||||
"bbb",
|
||||
"cccc"
|
||||
}));
|
||||
add(comboBox5, "cell 5 5,growx");
|
||||
add(comboBox5, "cell 5 5,growx,wmax 100");
|
||||
|
||||
//---- spinnerLabel ----
|
||||
spinnerLabel.setText("JSpinner:");
|
||||
|
||||
@@ -373,7 +373,6 @@ new FormModel {
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JComboBox" ) {
|
||||
name: "comboBox5"
|
||||
"prototypeDisplayValue": "12345"
|
||||
"model": new javax.swing.DefaultComboBoxModel {
|
||||
selectedItem: "wide popup if text is longer"
|
||||
addElement( "wide popup if text is longer" )
|
||||
@@ -382,7 +381,7 @@ new FormModel {
|
||||
addElement( "cccc" )
|
||||
}
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 5 5,growx"
|
||||
"value": "cell 5 5,growx,wmax 100"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "spinnerLabel"
|
||||
|
||||
Reference in New Issue
Block a user