public void setBounds(int x, int y, int w, int h) { super.setBounds(x, y, w, h); scrollpane.setBounds(0, 0, w / 3, h); scrollarea.setBounds(w / 3, 0, (2 * w) / 3, h); }