You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Greg Brown <gk...@mac.com> on 2010/10/21 14:02:03 UTC

Re: How To Write Chinese in Alert Window?

Hi Naniel,

I'm re-posting this to the Pivot user list - the dev list is for issues related to platform development, not app development. Also, you'll want to subscribe to the user list in order to see any responses to your questions.

You can open an alert with Chinese text the same as you would with any other kind of text:

Alert.alert("宋体", owner);

See the Javadoc for the Alert class for more information:

http://pivot.apache.org/1.5/docs/api/org/apache/pivot/wtk/Alert.html

G

On Oct 21, 2010, at 5:18 AM, 南磊 wrote:

> Hi Pivot Developer,
> Now I want to write Chinese in the Pivot Alert window, but I don't know how
> to write the code. In the button,I write the code like this "
> pushButton.getStyles().put("font", new Font("宋体", Font.BOLD, 24)); ". Of
> course it is worked. So could you give me some help or examples. Thank you.
> Yours.
> Nanlei From China.


Re: How To Write Chinese in Alert Window?

Posted by Todd Volkert <tv...@gmail.com>.
Note that you may need to make sure that you are using a font that
supports your characters, by calling Theme.getTheme().setFont() when
your application starts up.

-T

On Thu, Oct 21, 2010 at 8:02 AM, Greg Brown <gk...@mac.com> wrote:
> Hi Naniel,
>
> I'm re-posting this to the Pivot user list - the dev list is for issues related to platform development, not app development. Also, you'll want to subscribe to the user list in order to see any responses to your questions.
>
> You can open an alert with Chinese text the same as you would with any other kind of text:
>
> Alert.alert("宋体", owner);
>
> See the Javadoc for the Alert class for more information:
>
> http://pivot.apache.org/1.5/docs/api/org/apache/pivot/wtk/Alert.html
>
> G
>
> On Oct 21, 2010, at 5:18 AM, 南磊 wrote:
>
>> Hi Pivot Developer,
>> Now I want to write Chinese in the Pivot Alert window, but I don't know how
>> to write the code. In the button,I write the code like this "
>> pushButton.getStyles().put("font", new Font("宋体", Font.BOLD, 24)); ". Of
>> course it is worked. So could you give me some help or examples. Thank you.
>> Yours.
>> Nanlei From China.
>
>