private static JComponent createPanel(String text) { JLabel label = new JLabel(text); JBProgressBar progress = new JBProgressBar(); progress.setIndeterminate(true); progress.setValue(30); progress.setOpaque(true); progress.setPreferredSize(new Dimension(400, progress.getPreferredSize().height)); JPanel panel = new JPanel(new LineLayout(5)); panel.add(label); panel.add(progress); return panel; }