Search:

Type: Posts; User: crzybldthrwr

Page 1 of 3 1 2 3

Search: Search took 0.09 seconds.

  1. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    Thats the main issue I had was that when I used that command jps, it tells me "array found, but arraylist required"
  2. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    Languages like C++ and VB which I know pretty well I can do things by myself and solve issues by myself.

    But java is new to me and I can't do that.

    edit: Thanks for you help though, I did learn...
  3. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    Well thanks anyways. I can't learn like others learn, looking at API docs and trying these "simple" programs to test class features and such. I need to see relevant examples in terms of my own code,...
  4. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    I honestly have no idea.
    I don't know how to access the X and Y coordinates from the Point instance while they're in that arrayList element.


    that's it.
  5. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    No matter how simple the program is, if I don't know the syntax it's not gonna matter.
  6. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    For me it won't help because I don't know the syntax?
    all I need to figure out is how to get the x and y from the Point instance in the arraylist.
  7. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    As each element in the array is an instance of Point, that means each element has an x and a y in that container; i just don't know how to access them
    because ia[1].getX() doesn't work lol
  8. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    I don't see how that would really help me, as I don't know how to GET the x and y from the instances of the class within the array, so i can't write that simple program?
  9. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    Edited post 67 to include my progress

    as in post 67, just not sure how to call getX and getY from the point class while inside the drawline function
  10. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    Am i creating seperate instances of the class for every new xy coordinate?

    EDIT: this is what I have so far, I'm confused now as to how to get the x,y from each point instance when calling...
  11. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    I have



    public class point{
    protected int x, y;
    }


    and that's as far as I got
  12. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    Now I'm just more confused.

    I can't get a feel for it by looking at all the docs and functions of the class, I need to be able to find semi-relevant examples of the code, and I can't find that for...
  13. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    I guess what I really meant was, do I use al.add(x) and then al.add(y)
    or should I give them specific locations in the array like al.add(1, x) ?
  14. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    I guess my question isnt where, its pretty much how.

    I know the calls, Ijust don't know where to implement them
  15. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    Ok now my issue comes in, where exactly am I adding points to the arraylist AND how exactly do i make it so it draws everypoint?
  16. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    OH ok , I already have an arraylist defined up there, i've kept it there incase.
    is something like this correct?



    ArrayList al = new ArrayList(50000);
    Integer ia[] = (Integer[])...
  17. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    by at class level you mean, do something like:


    public class ArrayList {
    ....
    }
  18. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    Because the applet would need to redraw every point in the array like, everytime the mouse moved?
  19. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    I tried and you keep saying to use an arraylist.

    I dont know how, as i've said before. I know the calls and such, but I don't know where I'd put any of it.
  20. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    Hm I have jdk 1.7.0_07
    so What do you suggest?
  21. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    I'm not really sure what you meant by move the GUI, could you point out where in the code that would be done?
  22. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    nvm I figured it out, but it still gives me that weird textArea thing
  23. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    How did you do that?
  24. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    Well what's different about your code and mine?
  25. Replies
    85
    Views
    1,327

    Re: drawLine problem, lines not connected

    Here are the two files I'm using as of right now

    MouseMotionEventDemo.java


    package events;

    /*
    * MouseMotionEventDemo.java
    *
Results 1 to 25 of 65
Page 1 of 3 1 2 3