Loading and parsing file and displaying said file as graph with Java GraphStream

41 Views Asked by At

The loading and parsing of the file proceeds without an obvious problem but the ViewPanel in which I try to display the graph does not show immediately when initiating the action that should lead to this. Instead the container in which the ViewPanel (=an object that inherits from JPanel) with the graph should show remains empty. This changes when I then click twice on the application window, for instance by first clicking the minimization icon and then enlarging the window again with a click on the corresponding icon. After these two clicks the desired graphs shows up on the screen which implies that the ViewPanel too is then doing what it should be doing. Those two clicks, however, are a nuisance, as far as I can see they have nothing to do with the code I wrote and they should not be necessary. How can I get rid of the necessity for them and have the graph displayed seamlessly after prompting the action that should lead to the graph being displayed?

I am grateful for any kind of helpful advice.

0

There are 0 best solutions below