The issue I am having is that I want to fill an oval, but I am using floats as my 'x' and 'y' values. Here is what I have:
@Override
public void paintComponent(Graphics g)
{
.
.
.
for(Coordinates cord : tempVertices)
{
g.fillOval(cord.x,cord.y,DIAMETER,DIAMETER);
}
// DIAMETER = 10
// Coordinate Class is just a variable with an 'x' and 'y' value stored in floats
// Floats range from 0 to 1, so type casting won't work...
// tempVertices is just an ArrayList with Coordinates values
I am using NetBeans IDE 7.2 and I don't know how to override the fillOval
method, and I cannot use an import from : import org.newdawn.slick.*;
(It wouldn't recognize it). Is there a better Graphics
option or easier way to achieve this simple fillOval
?