-
- add(progressLabel, BorderLayout.WEST);
- add(progressBar, BorderLayout.CENTER);
+ progressLabel.setFont(new java.awt.Font("Verdana", 0, 11));
+
+ // Use a CardLayout to stop the progress bar panel moving around when
+ // changing visibility
+ labelPanel.setLayout(labelLayout);
+ barPanel.setLayout(barLayout);
+
+ labelPanel.add(progressLabel, VISIBLE);
+ labelPanel.add(new JPanel(), INVISIBLE);
+ barPanel.add(progressBar, VISIBLE);
+ barPanel.add(new JPanel(), INVISIBLE);
+
+ labelLayout.show(labelPanel, VISIBLE);
+ barLayout.show(barPanel, VISIBLE);
+
+ add(labelPanel, BorderLayout.WEST);
+ add(barPanel, BorderLayout.CENTER);
+ add(new JLabel(" "), BorderLayout.EAST);
+
+ setBorder(BorderFactory.createLineBorder(Color.black));
+ // setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));