0
package awt;
import java.awt.*;
public class GraphicPanel extends Panel {
	GraphicPanel() {
		setBackground(Color.black);
	}
	public void paint(Graphics g) {
		g.setColor(new Color(0,255,0));
		g.setFont(new Font("Helvetical", Font.PLAIN,14));
		g.drawString("Pusyy Cat Program!", 300, 100);
		g.drawOval(150,200,50,50);
		g.drawOval(200,200,30,30);
		g.setColor(new Color(1.0f,0,0));
		g.fillRect(30,100,150,10);
	}
	public static void main(String[] args) {
		Frame f = new Frame("Pussy Cat Window");
		GraphicPanel gp = new GraphicPanel();
		f.add(gp);
		f.setSize(300,300);
		f.setVisible(true);
	}
}

//Here is my problem in java using awt.........please help me to create a simple Mouse(animal) using awt..Thnx...............

4
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by Ismael_Jay
0

You could download a picture of a mouse and then paint that image. Or, you could always get some mice from under my stove - I think that's where they're all hiding.

0

how to make a simple mouse(animal)with a head.body,ears..................................setting the graphic panel

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.