Component glassPane=getGlassPane(); glassPane.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent event) { myLabel.setText("Halloa"); } });