File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Problem with drawing styled (attributed) text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Problem with drawing styled (attributed) text" Watch "Problem with drawing styled (attributed) text" New topic
Author

Problem with drawing styled (attributed) text

Velika Srbija
Ranch Hand

Joined: Jan 15, 2002
Posts: 172
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

Joined: Jan 15, 2002
Posts: 172
No idea???
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
This works okay.
Velika Srbija
Ranch Hand

Joined: Jan 15, 2002
Posts: 172
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));
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with drawing styled (attributed) text