ScaledImage is now static inner class. Try and catch -blocks updated to
Java7 syntax.