From owner-FreeBSD-users-jp@jp.freebsd.org  Tue Jan  5 16:12:30 1999
Received: (from daemon@localhost)
	by jaz.jp.freebsd.org (8.9.1+3.1W/8.7.3) id QAA17441;
	Tue, 5 Jan 1999 16:12:30 +0900 (JST)
	(envelope-from owner-FreeBSD-users-jp@jp.FreeBSD.org)
Received: from ns11.rim.or.jp (root@ns11.rim.or.jp [202.247.130.230])
	by jaz.jp.freebsd.org (8.9.1+3.1W/8.7.3) with ESMTP id QAA17432
	for <FreeBSD-users-jp@jp.freebsd.org>; Tue, 5 Jan 1999 16:12:29 +0900 (JST)
	(envelope-from kumabu@t3.rim.or.jp)
Received: from rayearth.rim.or.jp (rayearth.rim.or.jp [202.247.130.242]) by ns11.rim.or.jp (8.8.5/3.5Wpl2-ns11/RIMNET-2) with ESMTP
	id QAA12471 for <FreeBSD-users-jp@jp.freebsd.org>; Tue, 5 Jan 1999 16:12:28 +0900 (JST)
Received: (from uucp@localhost) by rayearth.rim.or.jp (8.8.8/3.5Wpl2-uucp1/RIMNET) with UUCP
	id QAA16782 for FreeBSD-users-jp@jp.freebsd.org; Tue, 5 Jan 1999 16:12:27 +0900 (JST)
Received: from localhost (localhost [127.0.0.1]) by red.snark.rim.or.jp (8.8.7/3.5Wpl7-98011205) with ESMTP id QAA18335 for <FreeBSD-users-jp@jp.freebsd.org>; Tue, 5 Jan 1999 16:06:40 +0900 (JST)
To: FreeBSD-users-jp@jp.freebsd.org
From: "Shin'ya Kumabuchi" <kumabu@t3.rim.or.jp>
In-Reply-To: Your message of "Tue, 05 Jan 1999 12:48:42 +0900"
	<36918B9ABE.B9ECYAMAG@smtp.alles.or.jp>
References: <36918B9ABE.B9ECYAMAG@smtp.alles.or.jp>
X-Mailer: Mew version 1.87 on Emacs 19.28.2 / Mule 2.3
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Message-Id: <19990105160639D.kumabu@t3.rim.or.jp>
Date: Tue, 05 Jan 1999 16:06:39 +0900
X-Dispatcher: imput version 980905(IM100)
Lines: 114
Reply-To: FreeBSD-users-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+981115
X-Sequence: FreeBSD-users-jp 36979
Subject: [FreeBSD-users-jp 36979] Re: About Swing Japanese Problem.
Errors-To: owner-FreeBSD-users-jp@jp.freebsd.org
Sender: owner-FreeBSD-users-jp@jp.freebsd.org
X-Originator: kumabu@t3.rim.or.jp

$B$/$^$V$A$G$9!#(B

// $B;d$N5-21$,3N$+$J$i!"(B"Tue, 05 Jan 1999 12:48:42 +0900" $B:"(B ...
// Yuji Yamaguchi <yamag@alles.or.jp> $B$5$s$O=q$-$^$7$?!#(B

  >> > javac $B$N%*%W%7%g%s$K(B -encoding EUCJIS $B$rIU$1$k$H$I$&$G$7$g$&!)(B
  >> 
  >> $B$*$)!"%P%C%A%j$G$7$?!*(B
  >> JDK 1.1.7, Swing 1.1, FreeBSD 3.0 $B$G;n$7$^$7$?!#(BJLabel, JButton $B$J$I$NF|K\(B
  >> $B8l$,I=<($5$l$k$h$&$K$J$j$^$7$?(B :)

> $B%G%U%)%k%H$N%(%s%3!<%G%#%s%0$,(B EUC $B$G$O$J$$$N$G$9$M!#(B

> [FreeBSD-users-jp 36939] $B$GCfB<$5$s$,$*$C$7$c$C$F$$$k$h$&$K(B
> $B4D6-JQ?t(B LANG $B$r(B ja_JP.EUC $B$K$9$l$P!"%G%U%)%k%H$N%(%s%3!<%G%#(B
> $B%s%0$,(B EUC $B$K$J$k$O$:$G$9!#$3$N%*%W%7%g%s$OI,MW$J$/$J$j$^$9!#(B

$B2H$G$O$U$@$s$O(B FreeBSD2.2.5 + JDK1.1.5 $B$J4D6-$J$N$G$9$,(B(JDK1.1.6 $B$r;H(B
$B$&$H6&M-%i%$%V%i%j$,8E$$$h$H$$$o$l$F$&$k$5$$$N$G!D(B ^_^;)$B!"$3$N4D6-$G$O(B 
LANG=ja_JP.EUC $B$K$7$F$$$F$b(B

  user.language=en
  file.encoding=8859_1

$B$K$J$C$F$7$^$C$F$$$^$9!#$J$N$G!"(Bjavac -encoding EUCJIS $B$G@8@.;~$KL@<((B
$BE*$K%(%s%3!<%G%#%s%0$r;XDj$7$F$$$F$b!"<B9T;~$K2=$1$F$7$^$$$^$9!#(B($BEvA3(B
$B$G$9$,!D(B)

JDK1.1.6 $B$r;H$&$H$A$c$s$H(B
  user.language=ja
  file.encoding=EUC_JP
$B$K$J$C$F$$$^$9!#(B
$B$?$V$s(B FreeBSD $B$N(B JDK1.1.5 $B$N%P%0$@$H;W$&$N$G(B 1.1.7 $B$OBg>fIW$@$m$&$H$O(B
$B;W$$$^$9$,!"$$$A$*$&(B System.getProperties().list() $B$7$F3NG'$7$F$_$F$O(B
$B$I$&$G$7$g$&$+!#(B

  >> JTextField, JTextArea $B$J$I$O%@%a$G$7$?!#$?$@$7!"@EE*$K$O(B JTextField,
  >> JTextArea $B$G$bBg>fIW$G!"<B9TCf$KF~NO$7$?$jI=<($7$?$j$9$k>l9g$O%@%a$G$7$?!#(B

FreeBSD2.2.5 + JDK1.1.6 + swing-1.1beta3 $B$G$o$?$7$,;n$7$F$_$?$H$3$m$G(B
$B$OLdBj$J$$46$8$@$C$?$N$G$9$,!"4*0c$$$7$F$k$+$J!D(B $B$$$A$*$&8e$m$K$o$?$7(B
$B$,;n$7$F$_$?D6%@%5%@%5$J%=!<%9$r$D$1$F$*$-$^$9$,!"$3$&$$$&$3$H$H$O$A$,(B
$B$$$^$9(B?

P.S.
$B$H$3$m$G!"$A$g$C$HOC$OJQ$o$k$N$G$9$,!"(BFreeBSD $B$G(B BeanShell $B$N(B 
Interpreter $B$,;H$($F$$$kJ}$O$*$i$l$^$9$+(B?
$B:G6a(B Emacs 20.3 + JDE 2.1.3 $B$J3+H/4D6-$r;HMQ$7$F$$$F!"$J$+$J$+>!<j$O$$(B
$B$$$N$G$9$,(B BeanShell $B$N(B Interpreter $B$,$&$^$/F0:n$7$J$$(B(version$BI=<($N8e(B
$B$K%W%m%s%W%H$,=P$J$$(B)$B$?$a!"$;$C$+$/$N(B Wizard $B5!G=$,;H$($J$/$F$1$C$3$&(B
$BHa$7$$$G$9!#(B

Solaris $B$G$O$A$c$s$HF0:n$9$k$7!"(BFreeBSD $B$N(B JDK $B$G$b(B bsh.Console $B$NJ}$N(B
$B<B9T$O$G$-$k$N$G$9$,!"!"!"(BConsole $B%b!<%I$G(B BeanShell $B$r;H$C$F$_$?46$8(B
$B$G$O!"(BBeanShell $B<+BN$O$J$+$J$+$h$5$2$J$7$m$b$N$G$9!#(B

# BeanShell $B$,$I$s$J$b$N$+$H$$$&$H!"(B
# % frm=new JFrame ( '%' $B$O(B bsh $B$N%W%m%s%W%H(B)
# % frm.getContentPane().add(new JButton("OK"))
# % frm.setVisible(true)
# $B$_$?$$$J$3$H$,$G$-$^$9!#(B($B$b$C$H$$$m$s$JMxMQ$,$G$-$k$O$:$G$9$,(B)

      _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
     _/   $B7'^<?5Li(B                             _/
    _/      e-mail: kumabu@t3.rim.or.jp       _/
   _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

------------------------------------------------------------
// Input Method $B$H$NO"7H$N$5$;J}$H!"%/%j%C%W%\!<%I$+$i$N<h$j9~$_J}$,J,(B
// $B$i$J$+$C$?$N$G!"J8;zF~NO$rI8=`F~NO$+$i<h$j9~$s$G$^$9!#(B(^_^;;
// JTextComponent#paste() $B$G$G$-$=$&$K;W$C$?$s$@$1$I$J$!!D(B
import	javax.swing.*;
import	java.awt.*;
import	java.awt.event.*;
import	java.io.*;

public class Japanese extends JFrame {
	JTextField	text1 = new JTextField("$B%F%9%H(B");
	JTextField	text2 = new JTextField(20);
	BufferedReader	in = new BufferedReader(new InputStreamReader(System.in));

	public Japanese(String title) {
		super(title);
		getContentPane().setLayout(new GridLayout(3, 1));
		
		text1.setEditable(false);
		getContentPane().add(text1);
		text2.setEditable(true);
		text2.addMouseListener(new MouseAdapter() {
			public void mouseClicked(MouseEvent e) {
				if (e.getModifiers() == InputEvent.BUTTON2_MASK) {
					text2.paste();
				}}});
		getContentPane().add(text2);
		JButton	btn = new JButton("$BF|K\8l(B");
		btn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (text2.getText().equals("")) {
					try {
						System.out.print("> ");
						String input = in.readLine();
						text2.setText(input);
					} catch (IOException ex) {}
				}
				text1.setText(text2.getText());
			}});
		getContentPane().add(btn);
		pack();
	}
	public static void main(String[] args) {
		new Japanese("Japanese Test").setVisible(true);
	}
}
------------------------------------------------------------
