I have the below code,
import javax.swing.*;
public class MyFrame
{
public static void main(String[] args) {
JFrame frame = new JFrame("Test Frame");
frame.setSize(400, 300);
frame.setVisible(true);
frame.setDefaultCloseOperation
(
JFrame.EXIT_ON_CLOSE
);
}
}
However when I 'Run' in Eclipse, it throws me an error that the selection could not be run. Im new to java, so Im not sure what's happening.
I tried to change the main class in Run Configurations, and I set it to MyFrame, however it's telling me that it can't find that class.
Image of my IDE: Image