Program Terminates, and JFrame Doesn't Appear
<p>Hey Guys I'm writing a java program for practice. It involves a JFrame, JButton, and action listener. When I try to run the program (through eclipse), the console says " Window(5) [Java Application]" [...]</p>

<p>Does anyone know a fix? Here is my code:</p>

<p><strong>Window.java</strong></p>

<pre><code>package com.github.dtroll.Carzett.main;

import java.awt.Color;

import javax.swing.JFrame;

public class Window {
public static void startGame() {
    JFrame f = new JFrame("Journey To Carzett");
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.setResizable(true);
    f.setBackground(Color.GRAY);
    f.setVisible(true);
    f.setSize(750, 500);
    //JPanel p = new JPanel(new BorderLayout());
}
public static void main(String args[]) {

    new Window();
           new StartPanel();
}


}
</code></pre>

<p><strong>StartPanel.java</strong>
(this is used to add a panel to the program when the button is pressed.)</p>

<pre><code>package com.github.dtroll.Carzett.main;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JPanel;
public class StartPanel extends JPanel implements ActionListener{


/**
 * 
 */
private static final long serialVersionUID = 1L;
private JButton start;

public StartPanel(){
    Icon startButton = new ImageIcon("/images/buttons/start.png");
    this.start = new JButton(startButton);
    this.start.addActionListener(this);
    this.add(start);
}

@Override
public void actionPerformed(ActionEvent e) {
    if(e.getSource() == start){
        //insert methods here
    }


}
}
</code></pre>
