The following code supposed to read a file containing a set of molecular structures, then add a bunch of JPanels (equal to the number of molecules) and create a molecule on each panel. I get the right no of panels at the runtime. However only the first molecule is drawn on the first panel?
The following code supposed to read a file containing a set of molecular structures,
Share
The
drawMolViewPanel()function seems a little overengineered. For one, thepaneslist seems to be mostly temporary (you add objects to it, then from that list, add them to theMolTable‘s own panel collection; I don’t think you need it). If I understand the function correctly, this does the same thing and makes more sense to me:I’m not entirely sure that’s your issue, unfortunately.