mardi 5 mai 2015
Swing BufferedImage zeichnen
Posted on 02:43 by verona
Hallo
ich habe schon alles durchsucht und versucht, aber ich schaffe es einfach nicht dieses Bild zu zeichnen und ich weiß einfach nicht woran es liegt. Könntet ihr mir helfen?
ich habe schon alles durchsucht und versucht, aber ich schaffe es einfach nicht dieses Bild zu zeichnen und ich weiß einfach nicht woran es liegt. Könntet ihr mir helfen?
Java Code:
-
-
BufferedImage image;
-
-
-
@Override
-
super.paintComponent(g);
-
g.drawImage(image, 0, 0, getWidth() - 1, getHeight() - 1, 0, 0, image.getWidth() - 1, image.getHeight() - 1, null);
-
}
-
-
-
this.image = image;
-
}
-
}
-
-
-
class Main {
-
Normal3 normal;
-
-
-
public void updateblack(){
-
// create image
-
// draw on image
-
for(int x = 0; x < 640; x++){
-
for(int y = 0; y < 480; y++){
-
image.setRGB(x,y,000000);
-
if(x==y){
-
image.setRGB(x, y, 2550000);
-
-
}
-
-
-
// TO UPDATE Black GUI, below steps are impotant
-
normal.setImage(image);
-
normal.repaint();
-
}
-
}
-
}
Swing BufferedImage zeichnen
Categories: Swing BufferedImage zeichnen
Inscription à :
Publier les commentaires (Atom)
0 commentaires:
Enregistrer un commentaire