Exemplo n.º 1
0
 // Metodo que carga las imagenes
 public void logo() {
   logo = new ImageIcon[getC()];
   for (int i = 0; i < getC(); i++) {
     logo[i] = new ImageIcon("Imagenes/" + Integer.toString(i) + ".JPG");
     ima[i] =
         new ImageIcon(logo[i].getImage().getScaledInstance(getAn(), getL(), Image.SCALE_DEFAULT));
   }
   va = new ImageIcon("Imagenes/interrogacion.PNG");
   vacio = new ImageIcon(va.getImage().getScaledInstance(getAn(), getL(), Image.SCALE_DEFAULT));
 }
Exemplo n.º 2
0
 public Cargas() {
   // Inicializacion de las variables
   Juego = new JPanel();
   logo = new ImageIcon[getC()];
   ima = new ImageIcon[getC()];
   ficha = new int[a][b];
   for (int i = 0; i < getC(); i++) {
     logo[i] = new ImageIcon();
     ima[i] = new ImageIcon();
   }
   va = new ImageIcon("Imagenes/interrogacion.PNG");
   vacio = new ImageIcon(va.getImage().getScaledInstance(an, l, Image.SCALE_DEFAULT));
 }