removed conditional from mousePressed to Frame object