Reputation: 78106
I was trying using the CSSBuilder plugin but it seems that it does not support the CSS background image property.
I have been searching in google and it seems you can add background image to a swing panel by subclassing the panel. But I am pretty new to Swing and I do not know how to do it. I would like to know if there is an easier way to accomplish this with griffon.
Thanks in advanced.
Upvotes: 0
Views: 148
Reputation: 3281
Here's one possible to solution:
Here's a barebones example
package sample
import javax.imageio.ImageIO
application(title: 'Sample',
preferredSize: [320, 330],
pack: true) {
backgroundPanel(image: ImageIO.read(app.getResourceAsURL('griffon-icon-256x256.png')))
}
Upvotes: 1