+
+
+
+ // added in the instant display of a splashscreen
+ try {
+ readConfig(false);
+ Graphics g = _container.getGraphics();
+ String imageFile = _ifc.backgroundImage;
+ BufferedImage bgImage = loadImage(_ifc.backgroundImage);
+ int bwidth = bgImage.getWidth();
+ int bheight = bgImage.getHeight();
+
+ instantSplashPane = new JPanel() {
+ @Override
+ protected void paintComponent(Graphics g)
+ {
+ super.paintComponent(g);
+ // attempt to draw a background image...
+ if (bgImage != null) {
+ g.drawImage(bgImage, 0, 0, this);
+ }
+ }
+ };
+
+ instantSplashPane.setSize(bwidth,bheight);
+ instantSplashPane.setPreferredSize(new Dimension(bwidth,bheight));
+
+ _layers.add(instantSplashPane, Integer.valueOf(0));
+
+ _container.setPreferredSize(new Dimension(bwidth,bheight));
+ } catch (Exception e) {
+ log.warning("Failed to set instant background image", "bg", _ifc.backgroundImage);
+ }
+
+
+