// f modifies original content pane // f: Component -> Component static JSplitPane addToWindowSplitRight_f(Component c, Component toAdd, O f) { JFrame frame = getFrame(c); JSplitPane sp; frame.setContentPane(sp = jhsplit((Component) callF(f, frame.getContentPane()), toAdd)); revalidate(frame); ret sp; }