Listen for resizing of jmonkey context

I’m using jmonkey in canvas made inside a swing application. The container its in allows for resizing. The viewports in jmonkey seem to know about resizing, but I’d also like for some of my AppStates to be notified so they can adjust themsleves.

Is there a way to do this directly in jmonkey? Or would I have to use component listeners in swing?

AppStates can’t do it (yet… it’s something I want to add)… but I assume at some level you are extending Application and that has a reshape() method that you can override to detect the changes, I think.

Edit: just make sure to call super.reshape()

2 Likes

That did the trick.

It would indeed be cool if AppStates had some kind of hook to subscribe to these events. But this works perfectly for my purposes for now.

thanks