1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[SOLVED] PaintListener not painting?

Discussion in 'Developer Support' started by SlashnHax, Dec 14, 2014.

  1. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,198
    Likes Received:
    1,041
    For some reason nothing is being painted to the canvas. My script bot extends LoopingScript and implements PaintListener, but onRepaint doesn't seem to be drawing anything to the client screen :(

    Code (Text):
    1.  
    2. @Override
    3. public void onPaint(Graphics2D g){
    4.     g.drawString("TEST", 300, 300);
    5. }
    6.  
     
  2. Tikas

    Joined:
    Oct 30, 2014
    Messages:
    69
    Likes Received:
    6
    Do you have this on your onStart()?
    Code (Text):
    1. getEventDispatcher().addListener(this);
     
  3. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,198
    Likes Received:
    1,041
    I do not. Thanks :D
     
  4. Tikas

    Joined:
    Oct 30, 2014
    Messages:
    69
    Likes Received:
    6
    Np :p
     
  5. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    I suggest you take a look at one of our official script bot skeletons.
     

Share This Page

Loading...