Handling Component Resizing: Mastering Java Swing Part 84

2m 33s
Download
Caveofprogramming

Cave of Programming

After working as a software developer and contractor for over 14 years for a whole bunch of companies including CSC, Proquest, SPSS and AT&T in the UK and... Read more

Detecting resize events in Swing.

Sometimes you want to take action when the user resizes one of your components. In the case of our little animation, we want to resize the back buffer when the animation component is resized. We'll look at how to do it in this tutorial.

Listening for component resizing
The ComponentListener interface
The ComponentAdapter class