MyCanvas: paint
public void paint(Graphics g) {
setBackground(Color.black);
g.setColor(Color.black);
g.fillOval(5,5,80,80);
g.fillRect(5,5,80,80);
g.setColor(currentColor);
if (shapeSpec.getText().equals("oval"))
g.fillOval(5,5,80,80);
else
g.fillRect(5,5,80,80);
}
Previous slide
Next slide
Back to first slide
View graphic version