java swing set initial window size code example
Example 1: set size of a jframe
import java.util.*;
public static void main(string args){
JFrame frame = new JFrame();
frame.setSize(200,200); // Where you set size
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
Example 2: change font size java swing
// make sure the new size is a float, not an int (add f at the end of the number)
label.setFont(label.getFont().deriveFont(newSize));