List of usage examples for javax.swing JFrame applyComponentOrientation
public void applyComponentOrientation(ComponentOrientation o)
From source file:Main.java
public static void main(String[] args) { JFrame frame = new JFrame("Layout"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); int horizontalGap = 20; int verticalGap = 10; Container contentPane = frame.getContentPane(); FlowLayout flowLayout = new FlowLayout(FlowLayout.LEADING, horizontalGap, verticalGap); contentPane.setLayout(flowLayout);// w w w . j ava2 s .co m frame.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); for (int i = 1; i <= 5; i++) { contentPane.add(new JButton("Button " + i)); } frame.pack(); frame.setVisible(true); }