Monday, 9 September 2013

Java 7 resize a JFrame (my GUI): the componentListener is not getting fired

Java 7 resize a JFrame (my GUI): the componentListener is not getting fired

I've Googled around and could not find an answer:
I have a JFrame as a GUI and set a componentListener like
this.addComponentListener(new CL(this, logger));
In the componentListener I have the componentResized, etc...
public void componentResized(ComponentEvent e) { if (e.getSource() == gui)
{ here I do the code } }
Everything is working fine under Java 6, but under Java 7, the Jframe is
being resized but is not being repainted: the component listener is not
getting called
I tried some alternatives from StackOverflow in the way of coding, but no
way to make it work.
When I minimize the GUI window and restore it, then "componentResized" is
being called.
Anyone an idea what's going on and why it works under Java 6 and not Java 7.

No comments:

Post a Comment