I am working on a bootloader that looks like this:

JFrame uses BorderLayout. IN NORTH I have a JPanel (FlowLayout). There is also a JPanel (FlowLayout) in SOUTH, in WEST I just have a JTextArea (in JScrollPane). All this is correctly shown. However, in EAST, I currently have a JPanel (GridLayout (10, 1)).
I want to show up to 10 JProgressBars in an EAST section that are dynamically added and removed from the panel. The problem is that I cannot make them look the way I want them to look: I want the JProgressBars width to fill the entire EAST section, because 1) it gives the application a more symmetrical look and 2) The ProgressBars can contain long strings that are not suitable at the moment. I tried putting a JPanel that contains GridLayout (10, 1) in a flowlayout, and then putting that flowlayout in the EAST section, but that didn't work either.
My code (SSCCE) currently looks like this:
import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.HashMap; import java.util.Map; public class Main { public static void main(String[] args) { new DownloadFrame(); } private static class DownloadFrame extends JFrame { private JButton downloadButton; private JTextField threadIdTextField; private JTextArea downloadStatusTextArea; private JScrollPane scrollPane; private JTextField downloadLocationTextField; private JButton downloadLocationButton; private JPanel North; private JPanel South; private JPanel ProgressBarPanel; private Map<String, JProgressBar> progressBarMap; public DownloadFrame() { InitComponents(); InitLayout(); AddComponents(); AddActionListeners(); setVisible(true); setSize(700, 300); } private void InitComponents() { downloadButton = new JButton("Dowload"); threadIdTextField = new JTextField(6); downloadStatusTextArea = new JTextArea(10, 30); scrollPane = new JScrollPane(downloadStatusTextArea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); downloadLocationTextField = new JTextField(40); downloadLocationButton = new JButton("..."); North = new JPanel(); South = new JPanel(); ProgressBarPanel = new JPanel(); progressBarMap = new HashMap<String, JProgressBar>(); } private void InitLayout() { North.setLayout(new FlowLayout()); South.setLayout(new FlowLayout()); ProgressBarPanel.setLayout(new GridLayout(10, 1)); } private void AddComponents() { North.add(threadIdTextField); North.add(downloadButton); add(North, BorderLayout.NORTH); add(ProgressBarPanel, BorderLayout.EAST); South.add(downloadLocationTextField); South.add(downloadLocationButton); add(South, BorderLayout.SOUTH); add(scrollPane, BorderLayout.WEST); } private void AddActionListeners() { downloadButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addNewProgessBar(threadIdTextField.getText()); } }); } public void addNewProgessBar(String threadId) { JProgressBar progressBar = new JProgressBar(); progressBar.setStringPainted(true); progressBarMap.put(threadId, progressBar); drawProgessBars(); } void drawProgessBars() { ProgressBarPanel.removeAll(); for (JProgressBar progressBar : progressBarMap.values()) { ProgressBarPanel.add(progressBar); } validate(); repaint(); } } }
Thanks in advance.
EDIT
The easiest solution: change
add(ProgressBarPanel, BorderLayout.EAST);
to
add(ProgressBarPanel, BorderLayout.CENTER);