• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with drawing styled (attributed) text  RSS feed

 
Velika Srbija
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider the following two code excerpts. First of them works OK, but the second does not. Why? They are almost same.





What is the problem? Is it a bug?
 
Velika Srbija
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No idea???
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This works okay.
 
Velika Srbija
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, it doesn't work. The string "1,2" is not subscripted.

Also, there is an error in the line:

astr.addAttribute(TextAttribute.SIZE, 36f);

It should be:

astr.addAttribute(TextAttribute.SIZE, new Float(36));
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!