import java.awt.*; import javax.swing.*; public class JProgressBarTest extends JFrame { public static void main(String[] args) throws Exception { JProgressBarTest t = new JProgressBarTest(); t.createAndShowGUI(); } private void createAndShowGUI() throws Exception { getContentPane().setLayout(new FlowLayout()); JProgressBar rtlProgressBar = new JProgressBar(0, 100); rtlProgressBar.setValue(30); rtlProgressBar.setBorderPainted(false); rtlProgressBar.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); JProgressBar ltrrogressBar = new JProgressBar(0, 100); ltrrogressBar.setValue(30); getContentPane().add(new JLabel("RTL progress bar:")); getContentPane().add(rtlProgressBar); getContentPane().add(new JLabel("LTR progress bar:")); getContentPane().add(ltrrogressBar); setSize(300,300); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); setVisible(true); } }