It's easily feasible, but it depends if you are using a specific framework. In brief :
If You use a simple Java Application, you create a simple Java Application on NETBEANS IDE and you just need to copy and paste all the code you wrote previously to the NETBEANS IDE.
My previous code in Vs code :
After simple copy -paste operations in NETBEANS IDE :
Then you can create any GUI components (Jpanels, Jframes, etc..) and include them in your orginal code.
For example in the above screenshot, the Chat.java file corresponds to a Jpanel I just created through the NETBEANS IDE, and by writing some code I easily integrate it with the original code.
2. Similarly, If you are building a Maven or Gradle Java project, you just need to repeat the same process but choosing a different option when you create a project on the NETBEANS IDE :
For example for a Maven project :
For example for a Gradle project: