redeye Posted September 13, 2014 Share Posted September 13, 2014 Hey, I've just come back to make bot scripts again and i was wondering why my paint is not working anymore.. I haven't seen in other scripts the code is any different from mine: public void onPaint(Graphics g) { Graphics2D gr = (Graphics2D)g; gr.setColor(Color.RED); gr.setFont(new Font("Arial", Font.PLAIN,20)); gr.drawString("Ores Mined: " + ore, 215, 50); g gr.drawString("Time running: " + uuren(runTime3.getElapsed()) + ":" + minuuten(runTime2.getElapsed()) + ":" + secoonden(runTime.getElapsed()) + ".", 25, 190); gr.drawString("Status: " + status, 25, 210); } Probs im overlooking something... Hope you can help me. Thanks in regard, Redeye Link to comment Share on other sites More sharing options...
FrostBug Posted September 13, 2014 Share Posted September 13, 2014 onPaint takes Graphics2D now instead of Graphics, thats why :p 1 Link to comment Share on other sites More sharing options...
Joseph Posted September 13, 2014 Share Posted September 13, 2014 onPaint takes Graphics2D now instead of Graphics, thats why op override the onPaint in your script. But the said code under it and remember to use Graphics2D as the arugment. Then it should work 1 Link to comment Share on other sites More sharing options...
Alek Posted September 13, 2014 Share Posted September 13, 2014 Welcome back redeye. A lot has changed and been added to the API. Make sure to check it out 1 Link to comment Share on other sites More sharing options...
redeye Posted September 13, 2014 Author Share Posted September 13, 2014 Hey, Thank you very much all for the feedback! Indeed a lot has haha, but will get there Some good API's i saw tho! Link to comment Share on other sites More sharing options...