June 22, 20169 yr Heyyo, I am trying to use the onPaint() method in my script but it is not showing up for some reason. @Override public void onPaint(Graphics2D g) { timeRan = System.currentTimeMillis() - this.timeBegan; g.drawString(ft(timeRan), 1, 1); currentXp = skills.getExperience(Skill.WOODCUTTING); xpGained = currentXp - beginningXp; g.drawString("" + xpGained, 1, 1); } Is there something wronge with that code? Thanks in advance BR c0nan Edited June 22, 20169 yr by c0nan
June 22, 20169 yr g.drawString("" + xpGained, 1, 1); The numbers in that code mean the x, y position of the paint, you need to change it to somethin like 1,15 to draw it correctly. Because it draws text from the bottom up.
June 22, 20169 yr Author g.drawString("" + xpGained, 1, 1); The numbers in that code mean the x, y position of the paint, you need to change it to somethin like 1,15 to draw it correctly. Because it draws text from the bottom up. Oh damn, haha Now I can see it , Thanks for you help!
June 22, 20169 yr Add these at the top: gd.setColor(Color.WHITE); gd.setFont(new Font("Arial", Font.PLAIN, 18));
Create an account or sign in to comment