Re: Multiple languages in one JLabel

From: Elly (Elly_at_no.where)
Date: 11/24/04


Date: Wed, 24 Nov 2004 19:11:59 GMT

Michael Borgwardt <brazil@brazils-animeland.de> wrote in
news:30k2gbF31ni1aU1@uni-berlin.de:

> Elly wrote:
>
>> I'm writing a utility that includes selecting and displaying files
>> from the desktop.
>>
>> I'm running into problems since windows xp can have filenames made up
>> of characters from multiple languages.
>>
>> How does one display such a string in a JLabel?
>
> Just like any other string. Makes no difference to Java.

Java doesn't care about storing or using strings, but JLabel appears to
be incapable of displaying characters of different fonts within a single
label.

>
>> I thought of using a large font like MS Arial Unicode, but it isn't
>> distributable and the post I read mentioned that no large font exists
>> to handle all of the unicode character set in a complete manner for
>> native users of the various unicode characters.
>
> I think you can assume that the default font will be able to display
> all characters that a user in the default locale is likely to user.
> Windows itself has the same problem, after all.
>

In windows, a user can create filenames of mixed characters from
different languages.
These characters are all visible together in one filename on the windows
desktop.
If my Java app tries to display this file, it is unable to show all the
characters of different languages next to each other.
You have to choose one font or another for the JLabel, leaving square
boxes for the other characters.

-Elly



Relevant Pages

  • Re: [OT] [XP] ISO 8859/1 Code Page for DOS window?
    ... *** I can't say because I don't use Windows anymore. ... If you were to implement certain codes, your keyboard ... would display different characters for certain key presses. ...
    (comp.os.msdos.misc)
  • Re: CListCtrl unicode doesnt display korean characters correctly
    ... Use the "MS Mincho" font for my application: Ugly for non-chinese characters but works ... I first entered kanji Unicode data as showed by Character Map Windows ... do display (or maybe the height is too small, ...
    (microsoft.public.vc.mfc)
  • Re: Change icon and font size on the All Programs menu?
    ... General tab | Select Large icons or Small icons | Click OK | Click ... Start Menu Font. ... If you select a windows and buttons setting other than Windows Classic, ... of Display Properties, *NOT* Windows Classic theme on the Themes tab ...
    (microsoft.public.windowsxp.customize)
  • Re: Huge Fonts
    ... Restore to a point made the day before the problem started. ... How to Reinstall or Repair Internet Explorer and Outlook Express in Windows ... other pages display without background graphics, ... > change the display but I am still left with grossly oversized font and ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: VIM 7.0 under Windows and Unicode fonts
    ... characters. ... font "Fixedsys" doesn't display many of the characters correctly. ... and Cyrillic for Lucida Console). ...
    (comp.editors)