import javax.swing.*;
/**
 * 
 * @author capolsin
 *
 * Création d'un JPanel contenant l'image donnée en fond 
 * Création d'un JFrame contenant exactement le JPanel
 *  
 */
public class MonImageJFrame extends JFrame
{  
	private static final long serialVersionUID = 10L;
	private Affiche monAffiche;
	
MonImageJFrame(String titre, String s1, String s2)
  {
	super(titre);
	this.monAffiche = new Affiche(s1, s2);
    setContentPane(this.monAffiche);
  }
  
  public static void main(String[] argv)
  {
	MonImageJFrame monCadre = new MonImageJFrame("JFrame avec images","kids01.jpg", "world.gif");
	
	// Indispensable pour donner au JFrame la taille exacte du JPanel 
	monCadre.pack();
    monCadre.setVisible(true);
  }
}

