• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

resize svg image

 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

i have a main class and another for the svg:



the svg image is displayed without problem.....


are there a way to resize the svg when we resize the frame?
because when i resize the application, the svg is not resized

thanks
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What kind of class is JSVGCanvas? Its documentation should explain how to do this.
 
mark smith
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ulf Dittmer:
What kind of class is JSVGCanvas? Its documentation should explain how to do this.



it's a canvas

i want to display a svg image, i use batk to use it

if my main class extend a jframe and i use a canvas to display the svg image, that work fine

example


now i have a main class who extends jframe, i use a borderLayout on the center i put a panel, on this panel i put a canvas

/*
public class JonoGui extends JFrame{
public JLabel lblTimer;
public JonoGui(){
super("Jono");
setSize(640,480);
lblTimer = new JLabel("test");
JPanel pane = new JPanel();
pane.setLayout(new BorderLayout());
pane.add("West",lblTimer);
setContentPane(pane);
ImgPane imgPane = new ImgPane();
pane.add("Center", imgPane);
}
[/code]

my ImgPane to display the svg image


1. i need to resize the application to see the image
2. i i resize the application, the image is small don't take all the space

you can see the result at
http://www.laboiteaprog.com/java_problem.png

any idea?


thanks
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A quick Google search brings up this post, which seems highly relevant. There are several more results that bear checking out.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic