Alternate way of overriding AWT