static Component addToPossiblyInternalFrame(final Component c, final Component toAdd) { if (toAdd != null) swing { RootPaneContainer frame = getPossiblyInternalFrame(c); Container cp = frame.getContentPane(); new JPanel newCP; newCP.setLayout(new BorderLayout); newCP.add(BorderLayout.CENTER, cp); newCP.add(BorderLayout.SOUTH, toAdd); frame.setContentPane(newCP); revalidate(frame); } ret c; }