Java
For code editing:
Eclipse
The Eclipse IDE for Java Developers contains what you need to build Java applications. Considered by many to be the best Java development tool available, the Eclipse IDE for Java Developers provides superior Java editing with validation, incremental compilation, cross-referencing, code assist; an XML Editor; Mylyn; and much more.
Should be the best as it's free and has thousands of plugins which would let you do almost everything.
Visit: http://www.eclipse.org/
NetBeans
From the creator of Java itself, this is also a quality tool.
Their website says,
"The NetBeans IDE is a free, open-source Integrated Development Environment for software developers. You get all the tools you need to create professional desktop, enterprise, web and mobile applications, in Java, C/C++ and even Ruby. The IDE runs on many platforms including Windows, Linux, Mac OS X and Solaris; it is easy to install and use straight out of the box.
The 6.0 release includes significant enhancements and new features, including a completely rewritten editor infrastructure, support for additional languages, new productivity features, and a simplified installation process that allows you to easily install and configure the IDE to meet your exact needs."
To know more, visit : http://www.netbeans.org/features/index.html