Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Modal window  RSS feed

 
Vrinda
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Guys,
Here's the nature of my problem.
I have developed a Japplet with an 'OK' button on it. On clicking it, it should open a modal window. How can I do this.
Thanks.
Vrinda
 
deekasha gunwant
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi vrinda,
u add an action listener to the button and in the actionperformed function open a JDialog with modal property true.
use the following constructor
JDialog jd = new JDialog(JFrame owner, String title, boolean modal);
regards
deekasha
[This message has been edited by deekasha gunwant (edited August 10, 2000).]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!