Because you are using NetBeans, the deleted file may yet be under local version control.
Create a new file having the same name and location.
Right click on the file's tab and select
History
.Click on the arrows to restore the missing content.
Learn layouts and free your inner GUI designer.