My JTabbedPane Doubles

0

Greetings. I have a problem with a JTabbedPane inside a JDialog. What happens to me is that I load the window with data that is shown in 3 different panels of a JTabbedPane. The first time I call the main JFrame there is no problem. But the second time I call it, when opening the JDialog it appears unconfigured and instead of appearing my 3 panels, 6 appear and so they continue adding 3 in 3 every time I call the window without having closed the application. I have searched many pages and can not find a solution. I appreciate any help you can give me.

    
asked by Jack Ryan 05.09.2016 в 16:08
source

1 answer

0

Have you tried deleting the previously created panels? If you have not deleted them, make sure, if you do not want to erase them, be careful not to create them again, simply make them visible again. These types of objects are not collected by the garbage collector unless you erase them.

    
answered by 06.09.2016 / 09:33
source