Article ID: 184067
Article Last Modified on 6/14/2006
public AWTFontXDemo()
{
appFrame = new Frame("TrueType Font Demo");
appFrame.setLayout(new BorderLayout());
edit = new TextArea("Enter some text");
button = new Button("Change Font");
appFrame.add(edit,"Center");
appFrame.add(button,"South");
button.addActionListener(this);
appFrame.setSize(320,200);
appFrame.setVisible(true);
}
public void actionPerformed(ActionEvent ae)
{
UIFontDialog dialog = new
UIFontDialog(FxToolkit.getHelperUIFrame());
dialog.show();
FontX font = (FontX)dialog.getFxFont();
edit.setFont(font);
edit.repaint();
}
}
Additional query words: font truetype
Keywords: kbhowto KB184067