I highly recommend NetBeans.
You can use it to develop C++ applications as well as Java applications.
If you decide to go ahead with NetBeans, please note that you need to install Sun-Java...and you can do that on Ubuntu by executing the following command within your terminal
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
Accept terms and conditions...and then install NetBeans