tags:

views:

56

answers:

3
+2  A: 

You have to use componentResized from ComponentListener.

Valentin Rocher
+2  A: 

Implement a ComponentListener with componentResized():

frame.addComponentListener(new ComponentListener {
    public void componentResized(ComponentEvent e) {
        // do stuff           
    }
});

(off the top of my head, consider pseudo-code)

Yuval A
you just have to implement all the other methods from ComponentListener
Valentin Rocher
of course :) this is just pseudo-code
Yuval A
sure ! that was just for the OP, to help him do the job :)
Valentin Rocher
+2  A: 

Overriding particular methods of ComponentAdapter is a convenient alternative to implementing all the methods of ComponentListener.

trashgod