Ksushant881
Ksushant881

Reputation: 66

JFormattedTextField does not cover all the space on GUI

I am trying to create this text field which shows remaining qty from table above it. This text field is not covering the column it is provided with completely and leaves an extra space to its right. I have another example of similar thing in codebase which is covering that space except there they used a PercentFormattedTextField. Not sure why is it doing it here. enter image description here

FormLayout layout = new FormLayout("pref, 10dlu:g, pref, 2dlu, pref",
                                           "pref:g,");

        PanelBuilder builder = new PanelBuilder(layout);

        builder.add(removeAssignmentButton,      CC.xy(1, 1, "left, center"));

        builder.addLabel("Remaining",            CC.xy(3, 1, "right, center"));
        builder.add(remainingTextField,          CC.xy(5, 1, "left, center"));

I tried setting/unsetting borders and all kinds of setting for the form layout. Nothing worked.

Upvotes: 1

Views: 19

Answers (0)

Related Questions