Okay, that took a bit of effort.
Basically, when you build the frame_panel
, you use gridwidth = 2
for the file_path_tf
and info_panel
, which is all fine an good, but you never reset the attribute when you add the buttons.
This means that save_button
can occupy columns 0 and 1 and cancel_button
can occupy 1 and 2
Reset the gridwidth
attribute after you've added the info_pane
and before you add the buttons
gbc.gridwidth = 1;
Also, I think you'll find JLabel
s much easier to deal with then JTextArea
s for labeling fields, but that's just me.