To add a new file to our Grails application in NetBeans we simply select File | New (Ctrl+N in Windows) while we have a Grails application open. NetBeans opens a new dialog and if we select the Groovy node we get a list of Grails filetypes we can select. NetBeans provides templates for these types or uses the Grails commands to create a new file to get a good start. For most filetypes we only have to specify the name and package, but for more general filetypes we can also define the location in the Grails directory structure.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEildVSIzwNY0CmqKpnhr_FUgaRsKq1eDQ37k0PeYVHTTTkzSo8A2ghf8JkfU_n9a1MLv4FouzCR3n5ptBfUA3lghHPHqB8t527JbaMwQm2NnmBWCZwta9VFlqyat72a9ZnehujHc_Z5USFk/s320/blog-nb-grails-new.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDpmGJKqYuOXa84XU-_-B0ozVOy4sZbU6dW6uXcMinHFhZc79hqoUckMR51hMWQn4YXKJrr-zXKocnBAhMtIHzIk_qVU9qVYyLNpvHK1CapumqyC2Eb7j18gV-fSghCY_jYlsuUMYWk1X4/s320/blog-nb-grails-new1.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAoawfzipCIt7zNwD6UsQS6OkkylKajYYyPyMB0aBMfCsczPmsr65CWg54aCm8hdgJQ96DuGdfWgEDlF1trvKMrDVoTQ3GVbRuUW6FO7Ugteir2RdaVU2nKdCZEwo105pN0vrvSmcTMVjB/s320/blog-nb-grails-new2.png)
We can also right-click on a node in our Grails application in the Project window. NetBeans has a context-sentive pop-up menu and if we select New... we see the most relevant Grails types for that node at the top. So if we right-click on the Domain Classes node we get the Grails Domain Class... option at the top.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyoog4GzZeBrsi-e8Ty_HVaZ17CQb-GExCjED-Nax3Vq4hNhw4Vo4NzcL2AS1I5jnndV1fkUV7ahsGDaJ5L3pJd8WY3qcTTrlFi7Dyg2vAQC6DWvFJLzck2xgwFJmNWZoztcQOI0aKC8W0/s320/blog-nb-grails-new3.png)