Off the top of my head, you might need to do something like this:
Code:public void mousePressed(MouseEvent e) { Object o = e.getSource(); if(o instanceof Frame) System.out.println(((Frame)o).getTitle()); //And I'm also thinking of getParent until you get the class you were looking for; then a test on the title or other parameter would tell you if it was the right object since you'd already have the right class }




Reply With Quote