I got rid of the inset but whenever I make y or x larger there is nothing in the JPanel
Type: Posts; User: Trunk Monkeey
I got rid of the inset but whenever I make y or x larger there is nothing in the JPanel
Well h and w are 10 and x and y range between like 1-10
If I try to put a higher value for x and y nothing will come up.
Yeah I put in some print statements and I tried just changing the numbers of h and w but it stays the same size but with less points
So at this point:
for (int i=0; i<1000; i++) {
int x = r.nextInt() % w;
int y = r.nextInt() % h;
g2d.drawLine(x, y, x, y);
}
What should I...
The GUI and the JPanel work alright
the points are the problem. The area they are drawn into is really small and when I try to change the size of the area it doesn't work at all
So I want the...
So i am making a GUI that lets you add in vertices onto a JPanel and so far I have:
import javax.swing.*;
import java.awt.*;
import java.util.ArrayList;
import java.awt.Dimension;
import...