Link to home
Start Free TrialLog in
Avatar of paredes_mynor
paredes_mynor

asked on

Which event identifies the close or remove of a JPanel?

Hello to everyone.

For example, I have two JLabels, and two JPanels.  Each of the JLabel(jlbl1, jlbl2) activates each respective JPanel (jpanel1, jpanel2).  Let's say, the jpanel1 is visible, and a QueryDataSet transaction is in the middle of the process, better said, is not posted to the database yet.  If I press the jlabel2, it will activate the jpanel2, but before that, I want to be able to detect that there's a not finalized transaction and prompt the option of saving the information.  Which event of the JPanel should take control of this?

I hope I presented the case in a understandable way.
Thanks,

Mynor.
Avatar of Mick Barry
Mick Barry
Flag of Australia image

why not disable jlabels2 while tx is still in progress, re-enableing when it is completed.
>>If I press the jlabel2, it will activate the jpanel2, but before that...

Simply disable the label until the processing has finished or intercept the mouse event and prompt to save
SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
objects :)
Avatar of paredes_mynor
paredes_mynor

ASKER

Thanks again you guys!!!
Thanks for closing :)
8-)
:)