This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
The code from page 371 makes a JFrame, inside of which is a button and a custom widget. The custom widget fills the background black, and also draws an oval whose colour changes randomly when the button is pressed.
What I don't understand is how the custom widgets' width and height attributes are being updated with the JFrames size - even as I resize the frame, becuase I haven't assigned anything to the attributes in code.