JDK and IDE
NetBeans
NetBeans IDE is open source, available for free from http://www.netbeans.org, runs on all modern operating systems, and include a popular GUI builder that can be used to develop GUIs for Java applications..
You can download the NetBeans tutorial here and the NetBeans GUI builder tutorial here
Create a new project
Code editor showing error message with the red X. Move the mouse over it to see the error message.
Fix the error. Run by clicking F6