Search:

Type: Posts; User: shadysback

Search: Search took 0.12 seconds.

  1. Replies
    15
    Views
    2,079

    Re: Can't simultaneously run two threads??

    Sorry i dont understand how i can override paintcomponent from within the thread, surely you have to set public methods and variables within the paintcomponent to modify it from an altogether...
  2. Replies
    15
    Views
    2,079

    Re: Can't simultaneously run two threads??

    Unfortunately thats a pre-requisite that i have to have each ball controlled by its own runnable/thread,
  3. Replies
    15
    Views
    2,079

    Re: Can't simultaneously run two threads??

    If i can ask one last question, i am trying to make a frame full of bouncing balls, i.e. each ball controlled by their own runnable, which bounce off the window panes. What would be a good layout...
  4. Replies
    15
    Views
    2,079

    Re: Can't simultaneously run two threads??

    It works!!! BTW i was trying out FlowLayout before you suggested GridLayout, and none of the components were showing on the frame. Do you have any idea why?
  5. Replies
    15
    Views
    2,079

    Re: Can't simultaneously run two threads??

    Hi i think i found out where i was going wrong. I was adding the component directly to the frame (refer to BallsFrame.java). I think you can only add one component directly to a frame.
  6. Replies
    15
    Views
    2,079

    Re: Can't simultaneously run two threads??

    Sorry about that. Here is the various pages of the program:
  7. Replies
    15
    Views
    2,079

    Re: Can't simultaneously run two threads??

    Hi i tried to make a small version of the program but i couldnt change classes into methods etc, as i am quite new at java. Heres a project folder from netbeans which contains all the source.
    Sorry...
  8. Replies
    15
    Views
    2,079

    Can't simultaneously run two threads??

    Hey Guys,

    I am creating a program which creates two balls (each with their own runnables which control them). This is the important code from the file:


    public BallsFrame() {
    ...
Results 1 to 8 of 8