thanassis.com
home
blog
Online Games
Sudoku
Ivory Tower
Web Hangman
Software
Java
Object Oriented
Mobiles / J2ME
Research
C.S. Resources
Galleries
Greece
Music
Photography
Art
Persona
l
About me
Useful Links
Contact
Site
Download
Latest News
Drawing Example Using the 2Dapi
public void paint(Graphics g) {
Graphics2D g2d = (Graphics2D)g;
g2d.setColor(Color.red);
Rectangle2D rect1 = new Rectangle2D.Double(32,42,100,100);
Rectangle2D rect2 = new Rectangle2D.Double(164,42,100,100);
g2d.fill(rect1);
g2d.draw(rect2);
}
}
Previous slide
Next slide
Back to first slide
View graphic version
Web
this site
Thanassis Blog News
In the News
Deep impact smashes comet
3 Florida shark attacks in a week
Mad Cow
summit in Scotland
Search the Archives