I just completed one JAVA course. I used NetBeans. I ran into a friend recently who told me about Eclipse.

In my next class I had to write a program with a GUI application. Which IDE do you prefer? Why?

I use Eclipse, mainly because it was the obvious next step from Borland JBuilder which I was using when that expired many years ago. However, since then I have been constrained because IBM (the largest employer of Java developers in this part of the world) prefers SWT over Swing, so that requires Eclipse.
Apart from SWT I don't think it makes any difference - Eclipse vs Neteans. Stick with whatever you are used to.

I use JCreator (lightweight), Eclipse and/or SpringSource for web-applications and NetBeans for desktop applications and class libraries.

now, for Swing, it doesn't really matter, as long as you learn it the right way: don't go right away relying on a Swing editor to generate the code for you: that code is very crappy, hard to read and even harder to maintain, not to mention the worst factor: you'll know how to use the editor, but you 'll hardly (or not at all) have learned to write and understand the code.