JDK Version: 1.2beta3-L
OS: Windows 95 + WinNT
Locale: ALL
This bug is not an i18n one.
In win95, we can not change a list font correctly. Following is a program
to show this problem. In solaris, it works well.
===========================CheckFont.java=================================
import java.awt.*;
import java.awt.event.*;
public class CheckFont implements ItemListener {
Choice choice;
List list;
Frame f;
public static void main(String args[]) {
new CheckFont();
}
public CheckFont() {
f = new Frame("Check Font");
f.setLayout(new BorderLayout());
choice = new Choice();
choice.add("12");
choice.add("18");
choice.add("32");
choice.add("48");
choice.add("64");
choice.addItemListener(this);
list = new List(10);
for (int i = 0; i < 10; i++) {
list.add("My Number is " + i);
}
f.add("North", choice);
f.add("Center", list);
f.pack();
f.setVisible(true);
//f.setResizable(false);
}
public void itemStateChanged(ItemEvent e) {
int size = Integer.parseInt(choice.getSelectedItem());
Font font = new Font("Dialog", Font.PLAIN, size);
list.setFont(font);
list.invalidate();
f.pack();
}
}
===========================================================================
jim.hu@prc 1998-03-12
OS: Windows 95 + WinNT
Locale: ALL
This bug is not an i18n one.
In win95, we can not change a list font correctly. Following is a program
to show this problem. In solaris, it works well.
===========================CheckFont.java=================================
import java.awt.*;
import java.awt.event.*;
public class CheckFont implements ItemListener {
Choice choice;
List list;
Frame f;
public static void main(String args[]) {
new CheckFont();
}
public CheckFont() {
f = new Frame("Check Font");
f.setLayout(new BorderLayout());
choice = new Choice();
choice.add("12");
choice.add("18");
choice.add("32");
choice.add("48");
choice.add("64");
choice.addItemListener(this);
list = new List(10);
for (int i = 0; i < 10; i++) {
list.add("My Number is " + i);
}
f.add("North", choice);
f.add("Center", list);
f.pack();
f.setVisible(true);
//f.setResizable(false);
}
public void itemStateChanged(ItemEvent e) {
int size = Integer.parseInt(choice.getSelectedItem());
Font font = new Font("Dialog", Font.PLAIN, size);
list.setFont(font);
list.invalidate();
f.pack();
}
}
===========================================================================
jim.hu@prc 1998-03-12
- relates to
-
JDK-4155301 Incorrect use of GetDC in win32 List.SetFont
- Resolved