List Info

Thread: Issue with starting size of image




Issue with starting size of image
user name
2006-08-29 20:54:39
Hi,

if I start the little enclosed test program, i get a window
(600x600) 
with a little square (about only .4 of the expected size) at
the top 
middle.
After resizing the window by only one pixel, the square
resizes istself 
to the expected size.
Any further resizing of the window don't have any effect on
the size of 
the square.

I don't understand this behaviour.

So, whats wrong with my code?

SVG and Java are attached.

Thank you for any help and hints

Reinhard








------------------------------------------------------------
---------
To unsubscribe, e-mail: batik-users-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org
Issue with starting size of image
user name
2006-08-30 09:39:38
Hi Reinhard,

   I suspect the problem is that you start loading the file
before you add 
the
canvas to the panel.  It is best to setup the Swing stuff
first.  Then 
start
the load of the canvas.

"Reinhard X. Fuerst" <rxffuerst-stuttgart.de> wrote on 08/29/2006 
04:54:39 PM:

> if I start the little enclosed test program, i get a
window (600x600) 
> with a little square (about only .4 of the expected
size) at the top 
> middle.
> After resizing the window by only one pixel, the square
resizes istself 
> to the expected size.
> Any further resizing of the window don't have any
effect on the size of 
> the square.
> 
> I don't understand this behaviour.
> 
> So, whats wrong with my code?
> 
> SVG and Java are attached.
> 
> Thank you for any help and hints
>      try
>         {
>             svg.setURI(f.toURL().toString());
>         }
>         catch (MalformedURLException e)
>         {
>             e.printStackTrace();
>         }
> 
>         panel.add(svg);
>         panel.setPreferredSize(new Dimension(600,600));
>         add(panel);
>     }


------------------------------------------------------------
---------
To unsubscribe, e-mail: batik-users-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )