Porque não pinta?!

0 respostas
F

Porque não está pintando esse código, estou usando rendernização ativa e não posso usar os métodos da rendernização passiva

protected void pintar(Graphics g) { 
			Graphics2D g2d = (Graphics2D) g;
 			 int x =50, y =50; 
 			 String s;
 			 //System.out.println("pWidth: " + pWidth);
 			for(int i = 0; i <= 20; i++) {
				if(x > pWidth - 100) {
					y = y + 100;
					x = 50;
					x1[i] = x;
					y1[i] = y;
				}		
				try {
					s = (String)ima.id.get(i); 
					nome2 = ima.getImage(s, i); 
					int w =  nome2.getWidth(null);
					int h = nome2.getHeight(null);
					bi = new BufferedImage(w,h,BufferedImage.TYPE_INT_ARGB);
					g2d =  bi.createGraphics();
					g2d.drawImage(bi, x,y,this);
					g2d.dispose();
					x1[i] = x;	
					x = x + 100;
				}	
				catch(Exception e) {
				e.printStackTrace();
				}		
			}
 			
 		}

me de uma luz aonde eu possa estar errando?!

abraço,

Criado 14 de março de 2012
Respostas 0
Participantes 1