This week's book giveaway is in the Beginning Java forum.
We're giving away four copies of Murach's Java Programming and have Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Text conversion  RSS feed

 
Mohksin Rashid
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all...i did some codings..whereby an image is to be overlapped by text but what happened was the text is not on the image but on the canvas..now, i need to convert the text to image pixels b4 i can overlap it on the image..does anyone know which class to use? or is there a better method? ive been trying to do it for a week now.thx in advance.


Mohksin Rashid
 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hiya Mohksin,

I've never really had this problem. If you make sure you do (say) g.fillRect() before g.drawString() then the text should appear on top - always has done for me!

Cheers,
James
 
You can't expect to wield supreme executive power just because
Thoughts on deprecation in Java
https://coderanch.com/t/683016/java/Deprecation-Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!