-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.2.0
-
x86
-
solaris_2.6
Name: rm29839 Date: 04/30/98
setFont in JTextArea doesn't work under
Solaris/X86 (JDK 1.2 beta 3).
Even the NotePad demo of the JDK fails to
use the specified Monospaced font.
The following testcase demonstrates the bug.
The font should be Monospaced. Instead it is
a default proportional font.
If the Swing components are replaced with their
AWT counterparts (JTextArea==>TextArea,
JFrame==>Frame), it works fine.
-----------------------------------------------
import java.awt.swing.JTextArea;
import java.awt.swing.JFrame;
import java.awt.Container;
import java.awt.Font;
class TT {
static final String areaText =
"wwwwwWWWW\n" +
"iiiiiIIII\n"
;
public static void main(String args[]){
JTextArea area = new JTextArea(areaText);
area.setFont(new Font("Monospaced",Font.PLAIN,24));
JFrame frame = new JFrame();
frame.getContentPane().add(area);
frame.pack();
frame.setSize(300,300);
frame.setVisible(true);
}
}
(Review ID: 27973)
======================================================================
- duplicates
-
JDK-4139138 Need to fully support multi-font on Solaris
-
- Closed
-