My GUI window is opening but nothing is being displayed. By printing out my mainPanel and graphPanel, I can deduce that it's not taking my border values.
I'm new to GUI, can someone help me out.
public class MainGUI extends JFrame{
    public static void main(String [] args){
        JFrame frame = new MainGUI("Title");
        frame.setVisible(true);
    }
    public MainGUI(String title){
        super(title);
        JPanel mainPanel = new JPanel();
        JPanel graphPanel = new JPanel();
        int w = 200;
        int h = 200;
        System.out.println(mainPanel);
        mainPanel.setBorder(BorderFactory.createEmptyBorder(20, 45, 50, 20)); //Create panel Border
        System.out.println(mainPanel);
        graphPanel.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
        graphPanel.setLayout(new GridLayout(1, 1));
        System.out.println(graphPanel);
        ....
        ....
 
    