|
|
@ -0,0 +1,27 @@ |
|
|
|
/* |
|
|
|
* To change this license header, choose License Headers in Project Properties. |
|
|
|
* To change this template file, choose Tools | Templates |
|
|
|
* and open the template in the editor. |
|
|
|
*/ |
|
|
|
|
|
|
|
package filtro_chido; |
|
|
|
import java.awt.Graphics; |
|
|
|
import javax.swing.ImageIcon; |
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
class Imagen extends javax.swing.JPanel { |
|
|
|
int x, y; |
|
|
|
|
|
|
|
public Imagen(JPanel jPanel1) { |
|
|
|
this.x = jPanel1.getWidth(); |
|
|
|
this.y = jPanel1.getHeight(); |
|
|
|
this.setSize(x, y); |
|
|
|
} |
|
|
|
|
|
|
|
public void paint(Graphics g, String img) { |
|
|
|
|
|
|
|
ImageIcon Img = new ImageIcon(getClass().getResource("/Images/imagen1.png")); |
|
|
|
g.drawImage(Img.getImage(), 0, 0, x, y, null); |
|
|
|
} |
|
|
|
|
|
|
|
} |