this explains your result:
protected Container createContentPane() { JComponent c = new JPanel(); c.setName(this.getName()+".contentPane"); c.setLayout(new BorderLayout() { public void addLayoutComponent(Component comp, Object constraints) { if (constraints == null) { constraints = BorderLayout.CENTER; } super.addLayoutComponent(comp, constraints); } }); return c; }
The contentpane creation method creates an anonymous inner class that inherits BorderLayout. So testing for instanceof will return true, but its a different class, so the class name is different.
source share