redeye Posted September 13, 2014 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
FrostBug Posted September 13, 2014 Posted September 13, 2014 onPaint takes Graphics2D now instead of Graphics, thats why :p 1
Joseph Posted September 13, 2014 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
Alek Posted September 13, 2014 Posted September 13, 2014 Welcome back redeye. A lot has changed and been added to the API. Make sure to check it out 1
redeye Posted September 13, 2014 Author 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!