Let me see if I can cobble something together. Take this code:
import java.awt.Dimension;
import java.awt.Graphics;
import javax.swing.JPanel;
import javax.swing.JFrame;
public class...
Type: Posts; User: KevinWorkman
Let me see if I can cobble something together. Take this code:
import java.awt.Dimension;
import java.awt.Graphics;
import javax.swing.JPanel;
import javax.swing.JFrame;
public class...
Yeah, that's expected. You'll have to cast them to ints before passing them into the method. Something like:
g.drawLine(0, 0, (int)x, (int)y);
Thanks for posting the SSCCE.
You've got a couple things going on here, which aren't exactly intuitive.
First, theoriginalanomaly is right about the integer division screwing you up. Your...
It's really up to you, but it seems to me that making it easier for us to help you would be a good idea. Your call. Posting an SSCCE will get you help in a manner of minutes, whereas posting code...
Can you post an SSCCE that demonstrates the problem that we can copy and paste into our own IDE and run and debug ourselves? It's hard to debug code with only disconnected snippets, and looking at...