Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ChatDialog just goes Invisible when I press the X

 
joe vasher
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I made the listener below to open up a ChatDialog(), The ChatDIalog I open, simply turns invisible when I press the X (! I THINK ???) So I reopen it with setVisible(true). is this all working the way I think it is? Is there any dangers doing this. This is a good way to keep a chat history?.?.

P.S. this will be working with threads. I can have several of these ChatDialogs opened or invisible at any one time.

thanks in advance.

 
Darryl Burke
Bartender
Posts: 5132
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't want the user to be able to close the dialog, set the defaultCloseOperation to DO_NOTHING_ON_CLOSE.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49411
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should bookmark the Java Tutorials, because they have all sorts of useful things in. Even a bit about what happens when you close a frame. Consider using dispose as a routine behaviour.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic