I'm trying to learn to use gui in java using eclipse ide. When I run this code
import javax.swing.JOptionPane;
public class GUI {
public static void main(String[] args) {
String name = JOptionPane.showInputDialog("Enter your name");
JOptionPane.showMessageDialog(null, "Hello "+name);
}
}
all it shows is terminated GUI [Java Application]
How can I fix this issue? screenshot