-
Notifications
You must be signed in to change notification settings - Fork 33
howto background image
Erich Seifert edited this page Mar 14, 2016
·
1 revision
To add a image to the background of the plot area use the following code:
try {
String bgImageUrl = "https://eseifert.github.io/logos/GRAL.png";
BufferedImage bgImage = ImageIO.read(new URL(bgImageUrl));
TexturePaint background = new TexturePaint(bgImage, new Rectangle2D.Double(0.0, 0.0, 1.0, 1.0));
plot.getPlotArea().setBackground(background);
} catch (IOException e) {
...
}