Name: joT67522 Date: 11/20/97
May be related to 4037637
textArea.setFont(new Font("Monospaced",Font.PLAIN,12));
The same Korean characters are displayed fine when
the font is set to "SansSerif".
Same problem on Solaris 2.5.1 and 2.6 X86 and
Sparc.
This problem has propogated since at least JDK
1.1.2 if not 1.1.1.
import java.awt.*;
import java.text.*;
import java.util.*;
class KoreanTextAreaBugTest extends Frame
{
static DateFormat dateTimeFormat=fixDateFormatTimeZoneBug(DateFormat.getDate
TimeInstance());
static String timeString=dateTimeFormat.format(new Date());
static String string="Actions: \uc791\uc5c5"; // Simultaneously display ISO
8859-1 and KSC5601
public KoreanTextAreaBugTest(String fontNm)
{
super(fontNm);
Button button = new Button(string);
TextArea textArea = new TextArea(3,20);
textArea.setFont(new Font(fontNm,Font.PLAIN,12));
setLayout(new BorderLayout());
add("South",button);
add("North",textArea);
textArea.append(string);
textArea.append("\n");
textArea.append(timeString);
pack();
}
static DateFormat fixDateFormatTimeZoneBug(DateFormat dateFormat)
{
dateFormat.setTimeZone(TimeZone.getDefault());
return dateFormat;
}
public static void main(String[] args)
{
KoreanTextAreaBugTest koreanTextAreaBugTestMonospaced = new KoreanTextAr
eaBugTest("Monospaced");
koreanTextAreaBugTestMonospaced.show();
KoreanTextAreaBugTest koreanTextAreaBugTestSansSerif = new KoreanTextAre
aBugTest("SansSerif");
koreanTextAreaBugTestSansSerif.show();
KoreanTextAreaBugTest koreanTextAreaBugTestSerif = new KoreanTextAreaBug
Test("Serif");
koreanTextAreaBugTestSerif.show();
}
}
(Review ID: 20468)
======================================================================
- relates to
-
JDK-4156921 Korean chars do not display in TextField with Serif/Monospaced BOLD font
-
- Closed
-