aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Using Subscript in Title Bar? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Using Subscript in Title Bar?" Watch "Using Subscript in Title Bar?" New topic
Author

Using Subscript in Title Bar?

Scott Florez
Ranch Hand

Joined: Dec 05, 2006
Posts: 58
Is it possible to use subscript in the title bar/task bar on applications? I am wanting to use H2O (with a subscript 2, as in water), but I can't seem to figure it out. Superscript seems to work for me, though, so I figure subscript can work. Thanks.
Kirill Grouchnikov
Greenhorn

Joined: Aug 03, 2006
Posts: 10
How did you get the superscript to work? If you're using a specific Unicode character for that, you'll just have to find the matching Unicode for the subscript character. Note that this still may fail if this symbol is not found in the matching font that is used to paint the title pane (depends whether you're running under OS-decorated or LAF-decorated mode).
Scott Florez
Ranch Hand

Joined: Dec 05, 2006
Posts: 58
Originally posted by Kirill Grouchnikov:
How did you get the superscript to work? If you're using a specific Unicode character for that, you'll just have to find the matching Unicode for the subscript character. Note that this still may fail if this symbol is not found in the matching font that is used to paint the title pane (depends whether you're running under OS-decorated or LAF-decorated mode).


I used the alt-key code (hold down alt and punch a 4 digit number) to get the superscript 2. However, the alt-key codes I've found for subscript don't work.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18985
    
    8

Then don't use those keystrokes. Use appropriate Unicode escapes. The subscript and superscript digits are in this section of Unicode.
Scott Florez
Ranch Hand

Joined: Dec 05, 2006
Posts: 58
Originally posted by Paul Clapham:
Then don't use those keystrokes. Use appropriate Unicode escapes. The subscript and superscript digits are in this section of Unicode.


Thanks for the tip. I haven't used unicode before, so here's what I tried:


Is that the right syntax? It's showing a small square on the title bar instead of the subscript 2. Thanks for the help!
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18985
    
    8

That's the right syntax. If you see a square box it means that the font you are using can't render that character.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using Subscript in Title Bar?