static A centerFrame_oldMethod(A c) { Window w = getWindow(c); if (w != null) w.setLocationRelativeTo(null); // magic trick ret c; } static A centerFrame_oldMethod(int w, int h, A c) { ret centerFrame_oldMethod(setFrameSize(w, h, c)); }