File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Displaying errors in a GUI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Displaying errors in a GUI" Watch "Displaying errors in a GUI" New topic
Author

Displaying errors in a GUI

Barry Brashear
Ranch Hand

Joined: Jun 05, 2001
Posts: 303
Does anyone have any ideas on how to display errors in a Swing GUI application if the user does not want to see dialogs?

Thanks.
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1121

Use the "status bar"?
Barry Brashear
Ranch Hand

Joined: Jun 05, 2001
Posts: 303
What's that? Is that an error of the application designed for displaying
errors? Is there another application I can look at that uses something
similar?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Status bars aren't really designed for error messages. If you can't use dialogs then I would either use in line error messages using a simple JLabel. You can set the font so that it is red, etc. If you don't have room per say for in line error messages, then create a message header on your form of some sort that can display error messages above all the components. Really, it's not that different than displaying error messages in web pages, if you are familiar with that at all.

Take a look at the JGoodies Validation Demo. It will give you some good ideas. You may even want to use that package.


GenRocket - A Test Data Generation Platform
Scott Delap
author
Ranch Hand

Joined: Apr 05, 2005
Posts: 73
I'll second JGoodies Validation. You can either display all validation errors in a summary component or change the components that have errors such as setting a text field background to red.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying errors in a GUI
 
Similar Threads
Retriving data from vector by matching user id
please can you help to identify those errors
IDEA 4.0 package com.intelliJ.uiDesigner does not exist
jar not working
Problem with hibernate.cfg.xml