Using JFreeChart? It is very helpful to use JFreeChart for reporting purposes of your system/ programs. However, you may notice that once you incorporate this in your system and you close it, your whole system/ application/ program will also exit or be closed. This is because JFreeCharts usually extends APPLICATIONFRAME that LISTENS to the close button and CLOSES EVERYTHING when clicked. (which is horrible for your system).
Solution?
Just override the windowclosing function!
Like this:
public void windowClosing(final WindowEvent evt){
if(evt.getWindow() == this){
dispose();
}
}
That's all you need :)
----
Solution?
Just override the windowclosing function!
Like this:
public void windowClosing(final WindowEvent evt){
if(evt.getWindow() == this){
dispose();
}
}
That's all you need :)
----
14 Reactions to this post
Add CommentThx you helped me alot
thank you veryyyyyyyyyyyyyyy much for this advice,
You are save my life
bye from Italy
:)
Thanks a lot! Appreciate it very much :)
welcome to all!!! :D
i am pleased to help you guys.. ^^,
thanks for this advise! i almost go crazy! xD
Perfect!
thanks!
welcome :) thanks for dropping by here :D
OMG thank you so much for this great idea! I've been facepalming for like 2 hours now searching for a solution... :D
welcome, im glad to help :)
Thank you very much, this has helped me in my project work greatly.
THANKS!!!!!
Thank you thank you thank you! You solved my problem in a minute! Kiiisseees!!!
Thanks, you're great!
This fantastic, thank you
Post a Comment