We help IT Professionals succeed at work.

Which event identifies the close or remove of a JPanel?

paredes_mynor
on
1,559 Views
Last Modified: 2013-11-23
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.
Comment
Watch Question

Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
why not disable jlabels2 while tx is still in progress, re-enableing when it is completed.
CERTIFIED EXPERT
Top Expert 2016

Commented:
>>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
CERTIFIED EXPERT
Top Expert 2016
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
objects :)

Author

Commented:
Thanks again you guys!!!
Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
Thanks for closing :)
CERTIFIED EXPERT
Top Expert 2016

Commented:
8-)

Commented:
:)
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.