title: Link GUI to Main Class
body: <p>I've created a java program and created the GUI for it. But I'm unable to link them together since this is my very first java program. my codes are as follows.</p>
  
  <p>Main</p>
  
  <pre><code>public class FinalN {
  
      private static void setRoundedCorners(XSSFChart chart, boolean setVal) {
          if (chart.getCTChartSpace().getRoundedCorners() == null) chart.getCTChartSpace().addNewRoundedCorners();
          chart.getCTChartSpace().getRoundedCorners().setVal(setVal);
      }
      public static void main (String[]args) throws Exception {
          File src= new File("C:\\Users\\File.xlsx");
          FileInputStream fis= new FileInputStream (src);
  
          XSSFWorkbook wb = new XSSFWorkbook(fis);
          XSSFSheet sheet1= wb.getSheetAt(0);
  // Continues
  </code></pre>
  
  <p>GUI</p>
  
  <pre><code>public class UserInterface {
  
      public class java {
  
      }
  
      private JFrame frame;
      private JTextField textField;
  
      /**
       * Launch the application.
       */
      public static void main(String[] args) {
          EventQueue.invokeLater(new Runnable() {
              public void run() {
  </code></pre>
  
  <p>I've tried to get an idea from this post <a href="https://stackoverflow.com/questions/25803428/how-to-load-a-java-gui-class-from-a-main-class">How to load a Java GUI class from a main class?</a> 
  but I'm unable to complete the task. Please help </p>