import javax.swing.JLabel; import javax.swing.JProgressBar; import org.jdesktop.swingx.JXFrame; import org.jdesktop.swingx.JXStatusBar; public class JXFrameBsp { public static void main(String[] args) { JXFrame frame = new JXFrame("JXFrame-Beispiel", true); frame.add(new JLabel("JXFrame-Beispiel", JLabel.CENTER)); JXStatusBar statusBar = new JXStatusBar(); JLabel progressLabel = new JLabel("Progress"); final JLabel endLabel = new JLabel(""); final JProgressBar pb = new JProgressBar(0, 100); progressLabel.setLabelFor(pb); statusBar.add(progressLabel); statusBar.add(pb); statusBar.add(endLabel); Thread t = new Thread(){ public void run(){ int i=0; while (i<=100){ pb.setValue(++i); try { Thread.sleep(30); } catch (InterruptedException e) { e.printStackTrace(); } if(pb.getMaximum() == i) endLabel.setText("feddisch!"); } } }; t.start(); frame.setStatusBar(statusBar); frame.setStartPosition(JXFrame.StartPosition.CenterInScreen); frame.setSize(300, 300); frame.setVisible(true); } }