• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Displaying error on an Applet

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have created an applet for a login screen. I have validation methods in my applet. I need to display errors within the applet for failed validations. how do i do it ? in jsp i can use out.println() function but am unaware how to achieve the same in an applet.

any suggestions ?

thanks in advance

nadda
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you could...
1. You could write the error to the console log. Use System.out.println(error) to write an entry to the java plugin console.
2. You could create a JLabel, add it to your screen and set the text to the error message to display the error back to the user.
 
Bartender
Posts: 9625
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could use AppletContext.showStatus(String status) to display a message in the status window at the bottom of the browser, but your users are likely to miss it.
You could pop up a dialog window, but you can't make dialogs modal in an applet (a modal dialog remains on top of the app and blocks input so the user has to respond to it)
I prefer to display a dialog within the applet, but block input to it. You can do this by displaying an "internal dialog" with one of the JOptionPane.showInternal*Dialog() methods and by adding a MouseListener to a JApplet's glassPane to block all other input.
[ February 28, 2005: Message edited by: Joe Ess ]
 
You showed up just in time for the waffles! And this 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