Archive for Mayo 14th, 2008

Incluyendo una imagen de fondo a un JFrame

Posted on Mayo 14, 2008. Filed under: Java, Swing | Tags: , , , , |

Para agregar una imagen de fondo a nuestro JFrame lo que hacemos es sobrescribir el método paint y en él pintamos la imagen de fondo precargada (jpg, png, gif, etc.) que queramos utilizar:

import java.awt.Graphics;
import java.awt.Image;
//…

public class FrameConFondo extends javax.swing.JFrame {
//…
private Image imagen = null;
[...]

Read Full Post | Make a Comment ( None so far )

Liked it here?
Why not try sites on the blogroll...