This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
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

dialog box warning  RSS feed

 
tomo black
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i have witten a GUI that requests user input. If the input is incorrect then a warning appears(using JDialog)to advise the user.
the problem is that if the user repeatedly enters incorrect input, then the same warning is produced many times. i would like for that warning to appear only once and for the GUI to become inactive until the warning message has been dealt with. At the moment the gui is still active when the warning is active.
i hope this problem is explained alright.
thanks in advance
 
Anthony Yip
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems that you have see your JDialog as non-modal. With a non-modal dialog, user can still input on the background GUI. You can solve it by creating a modal dialog.
However, if you just want to show a warning message, why not use the static method provided by JOptionPane, like showWarningMessage()?
Regards
Anthony Yip
[ March 10, 2004: Message edited by: Anthony Yip ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!