I am working on a project and added a CanvasPeer to a JPanel in a JFrame. What I need to do now is figure out a way to resize the CanvasPeer when the JFrame is resized.
I added a ComponentListener to my JPanel and in the componentResized method I did the following:
canvasPeer.resize(newWidth, newHeight)
But this doesn’t seem to work. Is there another way?
Thanks.
Gregg