I need to be able to programmatically change the font size of all the components in my Swing app. I cannot do this in the usual ways (with UIManager or putClientProperty) as
The following worked for me:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { ((javax.swing.border.TitledBorder) jPanel1.getBorder()). setTitleFont(new Font("Arial", Font.ITALIC, 14)); jPanel1.repaint(); }
I've tested this in NetBeans 6.9.1