Hey all. just doing a little font work, but am having troubles getting true
type fonts in Windows to work. I am doing this:
---------------
Label label = new Label("some text");
List edit = new List(5,false);
Font[] s =
GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
for (int i=0;i<s.length;i++)
edit.add(s[i].getName());
-----------------
and then this:
----------------
public void actionPerformed(ActionEvent ae)
{
Font f =
Font.decode(edit.getSelectedItem());//Font.decode(edit.getSelectedItem());
label.setFont(f);
}
-----------------
The list is populated correctly correctly, but when I pick a new true type
font, it won't seem to set the label font. It does work for the logical
fonts (ie - Dialog, DialogInput, Monospaced, Serif, SansSerif, or Symbol)
but not for true type. anyone know why?
Thanks!
John Sproull
using jdk 1.2.2
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing