My JFrame isn't executing or not even showing up when I press the run button. I am sure my code is right(Please Check) and I guess it could be an Eclipse Bug. Help would be Appreciated!
Eclipse Version: Neon
OS: Ubuntu Linux 16.04 LTS
Code:
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JLabel;
public class CreateServer {
public static JFrame start= new JFrame("TRDServerCreator");
public static void main(String[] args)
{
CreateServer.startwin();
}
public static void startwin ()
{
start.setSize(500,500);
start.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
start.setLocationRelativeTo(null);
start.setResizable(false);
JPanel cont= new JPanel();
start.add(cont);
JLabel n1=new JLabel("Thank you for choosing TRD Server Creator");
n1.setVisible(true);
JLabel n2=new JLabel("Pls select the Verison of your New Server");
n2.setVisible(true);
cont.add(n1,n2);
}
}
