Can a mouselistener be added to a component say JLabel after the JLabel has been added to the frame or panel ? Or eventlistener has to be added before adding the component to the panel or frame.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The order shouldn’t matter, since the user can’t interact with the control until the current piece of code returns control to the system. Are you having trouble catching an event?