SCJP
Visit my download page
Randall Twede wrote:(at least some of) the stuff they said i needed Graphics2D for i can do just using the Graphics g that i get passed to me.
i set the Stroke no problem.
Joanne
SCJP
Visit my download page
"Shape.java": B:\Greenwich\src\com\tests\Shape.java:31: cannot find symbol at line 31, column 0
symbol : method setStroke(java.awt.BasicStroke)
location: class java.awt.Graphics
g.setStroke(new BasicStroke(stroke));
Joanne
SCJP
Visit my download page
SCJP
Visit my download page
Randall Twede wrote:as you figured out there are other classes
Joanne
SCJP
Visit my download page
SCJP
Visit my download page
I think what is passed is an instance of a subclass of Graphics2D, but it is declared as Graphics.
SCJP
Visit my download page
Randall Twede wrote:what about
g2d.dispose();
is that something you should always do?
luck, db
There are no new questions, but there may be new answers.
Randall Twede wrote:i could maybe say public void draw(Graphics2D g)
instead of casting.
luck, db
There are no new questions, but there may be new answers.
SCJP
Visit my download page