Creating SVG of a JLabel with a colored border with SVGGraphics2D paints a filled rectangle in the size of the label instead of a text surrounded by a rectangle:
JLabel label = new JLabel("Label with border");
label.setBorder(BorderFactory.createLineBorder(Color.YELLOW)); // removing border shows text
label.setSize(label.getPreferredSize());
SVGGraphics2D graphics = new SVGGraphics2D(100, 40);
label.printAll(graphics);
Sorry for filing in another issue. We just tested JFreeSVG for generating SVG in our application. This and issue #24 are the two major issues we found.
Creating SVG of a JLabel with a colored border with SVGGraphics2D paints a filled rectangle in the size of the label instead of a text surrounded by a rectangle:
JLabel label = new JLabel("Label with border");
label.setBorder(BorderFactory.createLineBorder(Color.YELLOW)); // removing border shows text
label.setSize(label.getPreferredSize());
SVGGraphics2D graphics = new SVGGraphics2D(100, 40);
label.printAll(graphics);
Sorry for filing in another issue. We just tested JFreeSVG for generating SVG in our application. This and issue #24 are the two major issues we found.