01: package com.calipso.reportgenerator.userinterface;
02:
03: import javax.swing.*;
04: import java.awt.*;
05:
06: /**
07: * Esta clase se unitiza para poner imágenes en los paneles
08: */
09: public class ImagePanel extends JPanel {
10: Image img = null;
11:
12: public ImagePanel(Image image) {
13: img = image;
14: }
15:
16: public void paintComponent(Graphics g) {
17: super .paintComponent(g);
18: if (img != null) {
19: g.drawImage(img, 0, 0, getSize().width, getSize().height,
20: this);
21: }
22: }
23: }
|