6693507: There are unnecessary compilation warnings in the com.sun.java.swing.plaf.motif package

Removed unnecessary castings and other warnings

Reviewed-by: peterz
3 files changed