• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

dialog box warning

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic