The MyFrame class the extends JFrame and also contains the main method
import javax.swing.JFrame;
public class MyFrame extends JFrame{
//main method called on startup
public static void main(String[] args) throws InterruptedException {
//creates a frame window
...