Please see the image attached. I'm a beginner at Java GUI and was hoping someone could guide me in choosing a Layout Manager for GUI like this. I know I might have to use nested layoutmanagers, but I'm not sure which would help me accomplish this job.
Here's an idea:
Alternatively: you could use a 7x2 GridLayout and fill the two positions above the buttons with empty text fields, to separate the labels/fields above from the buttons below.
check out DesignGridLayout, it will be perfectly suited for this form I think
just look at their example:
with just a few lines of clean code:
layout.row().grid(label("Last Name")) .add(lastNameField) .grid(label("First Name")) .add(firstNameField);
layout.row().grid(label("Phone")) .add(phoneField) .grid(label("Email")) .add(emailField);
layout.row().grid(label("Address 1")) .add(address1Field);
layout.row().grid(label("Address 2")) .add(address2Field);
layout.row().grid(label("City"), 1) .add(cityField);
layout.row().grid(label("State")) .add(stateField) .grid(label("Postal Code")) .add(postalField);
layout.row().grid(label("Country"), 1) .add(countryField);
layout.emptyRow();
layout.row().center().add(newButton).add(deleteButton).add(editButton).add(saveButton).add(cancelButton);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With