I have a svg file in a panel and it is displayed. The problem occurs when i try to change the size of it (svg). I tried setSize, setPreferredSize and resize but none work. I noticed that when i try to resize it resizes but then goes back to it's previous size. Can someone help me, please?
svg.setPreferredSize(new Dimension(700,700));
svg.setSize(new Dimension(700,700));
this.add(svg, BorderLayout.NORTH);
thi开发者_如何学Gos.setSize(1000, 1000);
My class extends JPanel. I'm using batik.
I added svg to JSVGScrollPane. Now it works fine, resizes well and i have scrollbars when svg is bigger. It took me day and a half of experimenting with JPanels, JScrollPanes, but this is the best solution. [:
精彩评论