if (editorContainer instanceof JLayeredPane) {
JLayeredPane jlp = (JLayeredPane) editorContainer;
jlp.setLayer(newEditor, JLayeredPane.PALETTE_LAYER.intValue(), 1);
jlp.add(newEditor);
jlp.moveToFront(newEditor);
jlp.revalidate();
} else {
editorContainer.add(newEditor, 0);
editorContainer.revalidate();