File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Game Development and the fly likes Plotting Points Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Game Development
Bookmark "Plotting Points" Watch "Plotting Points" New topic

Plotting Points

colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 750
I can't find a method in Graphics2D to plot a point.
I can draw a line, eg g.drawLine(10,10,40,40);
but how do I plot a point at (x,y), without having to use:
g.drawLine(x,y,x,y); ???
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535

You can also use 'fillOval' or Rectangle2D.
I agree. Here's the link:
subject: Plotting Points
It's not a secret anymore!