title: Java Swing window not appearing in Eclipse
body: <p>I have this code below to display a window using Java Swing. The problem is when I run the code in eclipse the window does not show. When I export the file as an executable JAR file and run it it works. Is there a bug with eclipse that prevents it from running it from there?</p>
  <p>What am I missing?</p>
  <pre><code>package com.gui;
  
  import java.awt.EventQueue;
  
  import javax.swing.JFrame;
  import javax.swing.JLabel;
  import java.awt.BorderLayout;
  
  public class Calculator {
  
  private JFrame frame;
  
  /**
   * Launch the application.
   */
  public static void main(String[] args) {
      EventQueue.invokeLater(new Runnable() {
          public void run() {
              try {
                  Calculator window = new Calculator();
                  window.frame.setVisible(true);
                  
                  
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
      });
  }
  
  /**
   * Create the application.
   */
  public Calculator() {
      initialize();
  }
  
  /**
   * Initialize the contents of the frame.
   */
  private void initialize() {
      frame = new JFrame();
      //frame.setBounds(100, 100, 450, 300);
      frame.setSize(400, 200);
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      
      JLabel lblNewLabel = new JLabel(&quot;Hello World&quot;);
      frame.getContentPane().add(lblNewLabel, BorderLayout.NORTH);
      
      
  }
  
  }
  </code></pre>