I'm making a Java Swing application, which loads data from a MySQL database and puts it in a Gantt Chart (I'm using the swiftgantt 4.0 library for this).
I have a start window from where you can instantiate multiple JFrame
objects which contains a Gantt chart, you can select from the start window what data you want to retrieve from the database.
The program opens the frames with the charts correctly generated, but the problem is, that at certain action e.g.:resizing the window, or scrolling, or clicking on the chart, the content of the last frame appears in the other frame.
If I use the refreshing function of the Gantt chart, the content switches back, to the original content, but I think it's not a good solution to put the refreshing function to all events where this anomalies happen.
Does anyone have a clue what's happening here? I'm thinking of some event handling of the frames, might mix up the charts of the windows, but I'm not sure what causes this.