title: Java Swing UI not showing up when run
body: <p>I do not know if this is a duplicate question but when I run my java swing GUI code nothing shows up even with all the visibility's set as true. I am new to java swing gui creation so any help would be greatly appreciated. here is my pages class</p>
  <pre><code>class Pages {
      public static void Welcome_Screen() {
  //         Create the main screen for adding the other panels and buttons
          JPanel Main_Screen = new JPanel(new GridBagLayout());
          GridBagConstraints Main_Screen_Constraints = new GridBagConstraints();
  //         Set the size of the Main_Screen
          Main_Screen.setSize(1280, 720);
  
  //         Create the three panels needed to make this work
  //         Set the layouts as GridBagLayout and create the constraints needed
          JPanel Side_Panel = new JPanel();
          Side_Panel.setLayout(new GridBagLayout());
          GridBagConstraints Side_Panel_Constraints = new GridBagConstraints();
  
          JPanel Profile_Panel = new JPanel();
          Profile_Panel.setLayout(new GridBagLayout());
          GridBagConstraints Profile_Panel_Constraints = new GridBagConstraints();
  
          JPanel Button_Panel = new JPanel();
          Button_Panel.setLayout(new GridBagLayout());
          GridBagConstraints Button_Panel_Constraints = new GridBagConstraints();
  
          JPanel About_Panel = new JPanel();
          About_Panel.setLayout(new GridBagLayout());
          GridBagConstraints About_Panel_Constraints = new GridBagConstraints();
  
  //         Change the sides of the panels to fit them correctly
          Side_Panel.setPreferredSize(new Dimension(100, 720));
          Side_Panel.setMinimumSize(new Dimension(100, 720));
          Side_Panel.setMaximumSize(new Dimension(150, 1080));
          Profile_Panel.setPreferredSize(new Dimension(100, 100));
          Button_Panel.setPreferredSize(new Dimension(100, 620));
          About_Panel.setPreferredSize(new Dimension(1180, 720));
  
  //        Change the border types to null
          Side_Panel.setBorder(null);
          Profile_Panel.setBorder(null);
          Button_Panel.setBorder(null);
          About_Panel.setBorder(null);
  
  //        Create the Profile_Panel items
          ImageIcon Profile_Icon = new ImageIcon(&quot;Images/Profile_Icon.png&quot;);
          JButton Profile_Button = new JButton(Profile_Icon);
          Profile_Button.setSize(100, 100);
          Profile_Panel_Constraints.gridx = 0;
          Profile_Panel_Constraints.gridy = 0;
          Profile_Panel.add(Profile_Button, Profile_Panel_Constraints);
  
  //        Create the Buttons for the Button_Panel
          ImageIcon Java_Icon = new ImageIcon(&quot;Images/Java_Icon.png&quot;);
          JButton Java_Button = new JButton(Java_Icon);
          Java_Button.setSize(100, 155);
          Button_Panel_Constraints.gridx = 0;
          Button_Panel_Constraints.gridy = 0;
          Button_Panel.add(Java_Button, Button_Panel_Constraints);
  
          ImageIcon Python_Icon = new ImageIcon(&quot;Images/Python_Icon.png&quot;);
          JButton Python_Button = new JButton(Python_Icon);
          Python_Button.setSize(100, 155);
          Button_Panel_Constraints.gridy = 1;
          Button_Panel.add(Python_Button, Button_Panel_Constraints);
  
          ImageIcon CPP_Icon = new ImageIcon(&quot;Images/CPP_Icon.png&quot;);
          JButton CPP_Button = new JButton(CPP_Icon);
          CPP_Button.setSize(100, 155);
          Button_Panel_Constraints.gridy = 2;
          Button_Panel.add(CPP_Button);
  
          ImageIcon CS_Icon = new ImageIcon(&quot;Images/CS_Icon.png&quot;);
          JButton CS_Button = new JButton(CS_Icon);
          CS_Button.setSize(100, 155);
          Button_Panel_Constraints.gridy = 3;
          Button_Panel.add(CS_Button);
  
  //        About panel set up
          About_Panel.setLayout(new BorderLayout());
          JButton About_Panel_PlaceHolder = new JButton();
          About_Panel_PlaceHolder.setSize(1180, 720);
          About_Panel_Constraints.gridx = 0;
          About_Panel_Constraints.gridy = 0;
          About_Panel.add(About_Panel_PlaceHolder);
  
  //        Add the panels to the Main_Screen
          Side_Panel_Constraints.gridx = 0;
          Side_Panel_Constraints.gridy = 0;
          Side_Panel.add(Profile_Panel, Side_Panel_Constraints);
          Side_Panel_Constraints.gridy = 1;
          Side_Panel.add(Button_Panel, Side_Panel_Constraints);
          Main_Screen_Constraints.gridx = 0;
          Main_Screen_Constraints.gridy = 0;
          Main_Screen.add(Side_Panel, Main_Screen_Constraints);
          Main_Screen_Constraints.gridx = 1;
          Main_Screen.add(About_Panel, Main_Screen_Constraints);
  
  //        Set the Main_Screen visibility to true
          Side_Panel.setVisible(true);
          About_Panel.setVisible(true);
          Main_Screen.setVisible(true);
  
      }
  }
  </code></pre>
  <p>I understand that the code probably isn't orthodox programming as I am still learning how to do it. But any help with the UI not showing up would be greatly appreciated!</p>