It is site policy that must first show a "best effort" attempt at solving the problem yourself. This means that we do NOT do people's homework for them or do custom programming for people. So if you have something put together be sure to show us your code (with code tags) and then we can help move you in the right direction.
But as for actually creating a firewall out of Java, research suggests that you actually need a language which can go down the OS level and intercept all socket traffic. I believe this would be extremely hard to do with Java and perhaps more suitable for C or C++ at best. I have not actually seen a Java firewall either and that leads me to believe that one would not really work.
I believe programs like ZoneAlarm are written in C++ and is probably hooking into the OS through win32 api calls etc.
But that is all I know on the subject.