Re: JFrame resizing



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.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
.



Relevant Pages

  • Re: JFrame resizing
    ... Roedy Green schrieb: ... setSize(200, 100); ... be on a place before I call paint? ...
    (comp.lang.java.gui)
  • Re: how to delete a JList element
    ... I don't need to call paint() or anything like that once the underlying ... Roedy Green Canadian Mind Products ...
    (comp.lang.java.help)