Here you can find the source of setBounds(Container container, Component component, Rectangle bounds)
public static void setBounds(Container container, Component component, Rectangle bounds)
//package com.java2s; //License from project: Open Source License import java.awt.Component; import java.awt.Container; import java.awt.Rectangle; public class Main { public static void setBounds(Container container, Component component, Rectangle bounds)/*from w ww.j av a 2 s .com*/ /* */{ /* 3449 */if (container.getComponentOrientation().isLeftToRight()) { /* 3450 */component.setBounds(bounds); /* */} /* */else { /* 3453 */Rectangle r = new Rectangle(bounds); /* 3454 */int w = container.getWidth(); /* 3455 */r.x = (w - (bounds.x + bounds.width)); /* 3456 */component.setBounds(r); /* */} /* */} public static void setBounds(Container container, Component component, int x, int y, int width, int height) /* */{ /* 3472 */if (container.getComponentOrientation().isLeftToRight()) { /* 3473 */component.setBounds(x, y, width, height); /* */} /* */else { /* 3476 */int w = container.getWidth(); /* 3477 */component.setBounds(w - x - width, y, width, height); /* */} /* */} }