Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/05/2011, 04:38
cucuru
 
Fecha de Ingreso: marzo-2009
Mensajes: 509
Antigüedad: 15 años, 2 meses
Puntos: 17
jframe botón por delante del fondo

hola a todos, estoy creando un Jframe con una imagen de fondo y botones, el problema es que los botones me quedan detrás del fondo y no puedo usarlos (ni verlos), ¿cómo hago para traerlo delante?

Código PHP:
    private void pintar() throws Exception {
    
        
this.setLayout(null); 

        
ImageIcon imagen = new ImageIcon (getClass().getResource("/dibujos/libresDos.gif"));
        
JLabel fondo = new JLabel(imagen);
        
fondo.setBounds(new Rectangle(0,0,900,500));
        
this.add(fondo);
        
        
JButton boton = new botonRedondo();
        
boton.setBackground(Color.red);
        
boton.setBounds(new Rectangle(150,150,40,40));
        
boton.setVisible(true);
        
this.getContentPane().add(boton);
        } 
Me falta alguna instruccion?

Gracias!