If you're a beginner I'd recommend not to use an IDE. Seriously. They have a steeper learning curve than Java itself, so they make it harder to make progress in the beginning. Plus, it's very useful to learn directly about the intricacies of the "java" and "javac" commands, as well as the classpath.
Ping & DNS - updated with new look and Ping home screen widget
On Windows use a posh text editor. I like Notepad++ but there are other nice editors like Notepad2 and Crimson. Look for them on Google; they are often available free of charge. Don't use Notepad; it is too stark and basic. You want syntax highlighting, bracket highlighting and automatic indentation enabled, which make it much easier to find your way round the code. On Linux try gedit (Gnome desktop) or Kate (KDE desktop).