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" <rxf fuerst-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-unsubscribe xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help xmlgraphics.apache.org
|