I am working on Java GUI project. I have several components on the swing-based GUI. I want to change the font settings for all the components, rather than changing font for each component one by one.
Is there a way to change the font type and size of all the components on a JPanel on a JFrame.
Edit:
This is how my code looks:
public class Test extends JFrame{
public Test(){
//all components are initialized here. (some buttons and text fields) and added to this
this.setVisible(true);
}
public static void main(String []args){
new Test();
}
}
Best Answer
PS: I just copied this from old project of mine, and I am not sure from where I got it.