December 6th, 2010, 03:56 AM
Algorithm Help Please
I seem to be having a little issue getting my lines to connect. With this, I'm trying to input X,Ys, then draw lines connecting them all. Though it doesn't seem like I'm going at this right.
Here is the repaint i'm using, however only 2nd line I inserted connect then it goes crazy.
Any help is appreciated,
private class GraphicPanel extends JPanel
public void paintComponent(Graphics g)
Graphics2D g2 = (Graphics2D) g;
December 6th, 2010, 05:44 AM
Re: Algorithm Help Please
There's not enough information to really work out what you are trying to do or what is happening.
Basically you need to do some debugging yourself. Add some print statements to output the state of the variables and the co-ordinates you are drawing and you should be able to work out where it is going wrong.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!