I created a static method who create a JTabbedPane and every call a new JTabbedPane is created but I want when I call that method, a new instance (JTabbedPane) is created and the previous instance will be destroyed.
Code :
public static void create(ColumnsUI cols, SiteTypePannelUI siteType){
JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.LEFT);
/* code */
}