This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

showConfirmDialog:whatever choose program (simple send only, mail) EXITed...well  RSS feed

 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in case
m_textChanged == true
whatever choose, program (simple send only, email) EXITed...well? Is needed refer this listener elesewhere in program?

 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you trying to say, even if the user clicks No/Cancel, your GUI still exits?
Have you used JFrame#setDefaultCloseOperation in your code?
 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I used->

public static void main(String[] args) {

SMTPClient client = new SMTPClient();

client.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to set it to setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!