NetBeans is an IDE, not even a programming language. Indeed, you can do anything in NetBeans because NetBeans supports Java, C and C++ applications and much more. You can add more extensions to support even more.
Firewalls are implemented at the
gates, where network data flows. It controls which and how data flows in and out of the computer system.
If you want to work for a Firewall program, then I would recommend using C or C++ for controlling the network devices and the ports for communication. If you have to use a high-level language, then even C# is better than Java. You would require a language, or at least the API that can fit with the operating system or the kernel that manages the calls. This way you can scan and filter the requests... Based on the criteria of security and intelligense of the program.
Firewall (computing) - Wikipedia, the free encyclopedia[
^]