Re: JFrame resizing



Roedy Green schrieb:
On Wed, 28 May 2008 13:34:27 +0200, Stephan Lukits
<stephan.lukits@xxxxxxxxxxxxxxxx> wrote, quoted or indirectly quoted
someone who said :

if ( getSize().width != 200 || getSize().height != 100 ) {
System.out.println("Frame Size is different");
setSize( 200, 100 );

setSize should be done before you call paint. by then the Graphics
object is nailed down -- where its bits exist and how big in the regen
buffer.

Hm, wouldn't the code, placed into "componentResized(ComponentEvent e)"
event handling, be on a place before I call paint?

regards
Stephan
.