• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to highlight a string in canvas

mani senthil
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i drawn a string on canvas. i need to highlight a word in that string. is there any possibility?. Here is the same

protected void paint(Graphics g) {
g.setColor(255, 255, 255);
g.fillRect(0, 0, getWidth(), getHeight());
g.setColor(255, 0, 0);
g.drawString("Need to highlight any word in this string", 0, 0, Graphics.TOP | Graphics.LEFT);
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!