most likely because whatever class 'this' is an instance of inherits from java.awt.Graphics.