java Programming Glossary: fnt
Keeping the correct style on text retrieval http://stackoverflow.com/questions/9022366/keeping-the-correct-style-on-text-retrieval public class Fonts implements Runnable private String fnt private JFrame frm private JScrollPane jsp private JTextPane.. Cursor.getPredefinedCursor Cursor.WAIT_CURSOR fnt ge.getAvailableFontFamilyNames mas jta.getInputAttributes new.. Thread this .start @Override public void run for int i 0 i fnt.length i StyleConstants.setBold mas false StyleConstants.setItalic..
Change Font at runtime http://stackoverflow.com/questions/9958004/change-font-at-runtime public void actionPerformed ActionEvent e final Font fnt new Font fontsBox.getSelectedItem .toString Font.PLAIN 12 try.. .newInstance final FontUIResource res new FontUIResource fnt UIDefaults uiDefaults lnf.getDefaults uiDefaults.put Button.font.. final FontUIResource res new FontUIResource fnt defaults.put Button.font res defaults.put TextField.font res..
|