• Post Reply Bookmark Topic Watch Topic
  • New Topic

setVisible???

 
J Hartley
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have a little problem..
I create a new dialog with
dialog = new bookDialog
dialog.pack();
the user presses the book button which does the following...
dialog.setVisible(true);
to close this dialog i then call
dialog.setVisible(false);

Alls Fine. But next time i call dialog.setVisible(true); my dialog flashes on the screen for a second and then minimizes itself!!
Can Anyone Help?
cheers
joe
 
Anil Sadineni
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Joe,
Try to prepare ur dialog as Model. You may get whatever you want.
Anil
 
J Hartley
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, prepare as Model? , I dont follow you?
Cheers
Joe
 
Anil Sadineni
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Joe,
Prepare ur dialog as model dialog. See the API for JDialog constructers.

Bye
Anil
 
Nigel Browne
Ranch Hand
Posts: 703
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try using Dialog.show();
when the event to make your dialog visisble is fired.
When you want your dialog to close you could use Dialog.dispose();
[This message has been edited by Nigel Browne (edited May 28, 2001).]
 
J Hartley
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have my dialogs as Modal. The dispose() method works fine . Thanks for all your help.
Cheers
Joe
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!