what a noob.... you are extending Frame class so Y making an object of the same class inside that class, to set its properties you can do it using "this" keyword in the constructorlike......