I hope you need Java to use GTK look and feel. As jdv answered you can set it at the runtime or you can set it for all the Java swing applications using the following technique:
Step 1:
In Java 8 this file is not available by default. So the given command will create a new one. According to your Java version, change the path.
gksu gedit /usr/lib/jvm/jdk1.8.0_60/jre/lib/swing.properties
Step 2:
Add the following line in the file and save the file
swing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
Now run the application, you will get a native allok and feel for all the swing applications.
Eventhough it is not required for your Calculator application, enabling Global Menu will improve the look and feel of Java applications.
To enable Global menu:
Ste 1:
Install Jayatana using the following set of commands:
From Ubuntu 15.04 it is installed by default.
sudo add-apt-repository ppa:danjaredg/jayatana
sudo apt-get update
sudo apt-get install jayatana
Step 2:
Disable gloabl Jayatana configuration
sudo rm /usr/share/upstart/sessions/jayatana.conf
Step 3:
When you run a Java application, use the following command
java -jar -javaagent:/usr/share/java/jayatanaag.jar <file-name>
Credits to:
How can I get a java apps to use the GTK+ theme?
Global Menu Support for Java Applications in Ubuntu
I am unsure as to how the 4 potential exceptions could be handled though. Setting the look and feel to metal if Gtk cannot be found seemed logical, but it cannot be done without using another try ... catch (inside of what is already a try...catch). – Mike Oct 23 '15 at 03:59