473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Japense text on a JButton

Is it possible to do at all? The software will be used on computers
with western operative systems (so i guess, JVM will be english)
but i'm asured that japanese will be enabled through IME so that
all fonts-and-company are installed.

--

Kindly
Konrad
---------------------------------------------------
May all spammers die an agonizing death; have no burial places;
their souls be chased by demons in Gehenna from one room to
another for all eternity and more.

Sleep - thing used by ineffective people
as a substitute for coffee

Ambition - a poor excuse for not having
enough sense to be lazy
---------------------------------------------------


Jul 17 '05 #1
3 2281
Come to think of one more thing. The code is something like:

import javax.swing.*;
import java.awt.*;

public class Japanese extends JFrame {
public Japanese () {
JButton butt= new JButton ("\u4eca\u65e5\u306f");
GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment
();
butt.setFont (new Font ("Arial Unicode MS", Font.BOLD, 8));
this.getContentPane ().add (butt);
this.setVisible (true);
}

public static void main (String[] arg) {
new Japanese ();
}
}

The problem is that the only characters i get to see are squares... What do
i miss?!

--

Kindly
Konrad
---------------------------------------------------
May all spammers die an agonizing death; have no burial places;
their souls be chased by demons in Gehenna from one room to
another for all eternity and more.

Sleep - thing used by ineffective people
as a substitute for coffee

Ambition - a poor excuse for not having
enough sense to be lazy
---------------------------------------------------


Jul 17 '05 #2
Disregard my question, please. The hardly intelligent dumbass
(that would be me) forgot to change the "Arial Unicode MS"
to "MS Mincho" (the name of the japanese font).

This one tops my doh-list of 2004 this far...
Talking about waste of bandwidth...

--

Kindly
Konrad
---------------------------------------------------
May all spammers die an agonizing death; have no burial places;
their souls be chased by demons in Gehenna from one room to
another for all eternity and more.

Sleep - thing used by ineffective people
as a substitute for coffee

Ambition - a poor excuse for not having
enough sense to be lazy
---------------------------------------------------


Jul 17 '05 #3
Yes, it is possible. (Possible on many different OSs, when proper fonts
are installed on client)

You will need to insure that the Japanese character fonts for the OS are
installed, and
you must use the international version of the J2SE (JRE) which includes
the Japanese
i18n Font properties.

Konrad Den Ende wrote:
Is it possible to do at all? The software will be used on computers
with western operative systems (so i guess, JVM will be english)
but i'm asured that japanese will be enabled through IME so that
all fonts-and-company are installed.

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jeff T. | last post by:
Hi, I have a JMenuBar object that contains a JToolBar object which contains some JButton objects. After I let my applet sit for > 20 minutes, the graphics on those buttons would disappear. ...
4
by: porky008 | last post by:
I put in a next and previous button but it crashes when I run it. I also need it to loop around to the first or last if at the ends. Can some one help me with this? import java.awt.*; import...
0
by: Oswald Otte | last post by:
Hello How can I change the look of a disabled JButton? I have made a boardgame with a brown background and brown buttons. I have also put an imageicon on the buttons that has a colored image on...
9
by: SimonHeffer | last post by:
I've been asked to give my .NET app the same look and feel to another app written using Java/Swing. My main issue is to do with button/icons. The JButton used by the other app has an icon with a...
6
by: vijaykumarsharma | last post by:
Hi all I am having a problem with JButton. JButton b=new JButton("save"); how can i get the name of the JButton b. Please give the anser for me
2
by: sokeefe | last post by:
I am trying to edit the GUI of a project in Netbeans. In particular, I am trying to add new JButtons. I get a NullPointerException when I try to add an Event to any given JButton (even ones that...
1
by: sokeefe | last post by:
I am trying to edit the GUI of a project in Netbeans. In particular, I am trying to add new JButtons. I get a NullPointerException when I try to add an Event to any given JButton (even ones that...
12
by: yeshello54 | last post by:
So I want to set the background color of a Jbutton. I know that the normal way to do such a thing is down the following way: JButton button = new JButton("xxxx"); button.setBackground(Color.RED);...
1
by: mlibot | last post by:
My JButton will be disabled when running my program... my JButton will be enabled if the value or parameter are equal to 3... for example: 1 value is path of the file i selected. 2 vaue is path of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.