Search:

Type: Posts; User: Trunk Monkeey

Search: Search took 0.07 seconds.

  1. Replies
    11
    Views
    2,056

    Re: Points in a JPanel

    I got rid of the inset but whenever I make y or x larger there is nothing in the JPanel
  2. Replies
    11
    Views
    2,056

    Re: Points in a 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.
  3. Replies
    11
    Views
    2,056

    Re: Points in a JPanel

    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
  4. Replies
    11
    Views
    2,056

    Re: Points in a JPanel

    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...
  5. Replies
    11
    Views
    2,056

    Re: Points in a JPanel

    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...
  6. Replies
    11
    Views
    2,056

    Points in a JPanel

    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...
Results 1 to 6 of 6