Hello world. As far as I've seen, there's no easy way to make tileable background for a synth component using synth's xml configuration file. Hopefully, they'll support that feature in the future releases.
Till then, here's a workaround, using custom SynthPainter to make jPanel's background tileable:
...
<style id="panelStyle">
<object id="background" class="TilePainter"/>
<imageIcon id="icon" path="tile.png"/>
<property key="recoder" value="icon"/>
<painter method="panelBackground" idref="background"/>
</style>
<bind style="panelStyle" type="Region" key="Panel"/>
...
public class TilePainter extends SynthPainter {
public void paintPanelBackground(SynthContext context,
Graphics g, int x, int y, int w, int h) {
Graphics2D g2 = (Graphics2D)g;
ImageIcon i=(ImageIcon)context.getStyle().getIcon(context,"recoder");
Image im=i.getImage();
BufferedImage bi=new BufferedImage(im.getWidth(null),im.getHeight(null),
BufferedImage.TYPE_INT_RGB);
bi.createGraphics().drawImage(im,0,0,null);
TexturePaint tp=new TexturePaint(bi,new Rectangle(0,0,bi.getWidth(),bi.getHeight()));
g2.setPaint(tp);
g2.fill(g2.getClip());
}
}