Hi i am trying to create a triangle using the Polygon class. Eventually the program should allow the user to click on the screen and triangles should appear. I the programmer decide the size of the triangle.
When i try to compile i get the following error message Cannot find symbol variable x ---- find symbol variable y.
OK, so what is "myTri" declared as? If it's a java.awt.Polygon, there is an xpoints and a ypoints, but no x or y. But you've also declared your own x and y variables, so I'm not quite sure what you're doing; maybe you should show us more code.
Joined: Jan 20, 2007
Here is the full code:
Hope that this code helps guys
author and iconoclast
I'm afraid there may be some organizational problems that are preventing you from communicating effectively with us. Your previous code snippet is not a subset of this larger code -- in fact, it differs in the crucial aspect of how "x" and "y" are used. And aside from a few missing close-braces at the end, and the use of the undefined variable m_WndFont, this code compiles fine.