static void setFrameBounds(final Component c, final Rectangle bounds) { if (c != null) swing { JFrame f = getFrame(c); if (f != null) { f.setBounds(bounds); revalidate(f); } } } static void setFrameBounds(Component c, int x, int y, int w, int h) { setFrameBounds(c, new Rectangle(x, y, w, h)); }