List of usage examples for java.awt Component applyComponentOrientation
public void applyComponentOrientation(ComponentOrientation orientation)
From source file:Main.java
/** * Copies component orientation from one component to another. * * @param from/*from w w w .j a v a 2s. c o m*/ * component to copy orientation from * @param to * component to copy orientation into */ public static void copyOrientation(final Component from, final Component to) { final ComponentOrientation fo = from.getComponentOrientation(); if (fo.isLeftToRight() != to.getComponentOrientation().isLeftToRight()) { to.applyComponentOrientation(fo); } }