A: 

for your JFrame, add a ComponentListener (you can use the ComponentAdapter class and override the componentResized method).

    frame.addComponentListener(new ComponentAdapter() {
  @Override
  public void componentResized(ComponentEvent e) {
   // TODO handle the change
  }
    });

Everytime your jframe changes size, you need to also redraw your graphic. the problem is your canvasImage is of a fixed size, so you're going to have to create a new image (with the resized pane) and copy your original graphic into the new image. this is going to be a rather heavy operation

Rickster
A: 

If you extend JComponent you add it the a JFrame using BorderLayout, you get free resize notification.

kd304