How to write a Dialog Box???
1 posts in topic
Flat View  Flat View

Posted By:   vivek_puranik
Posted On:   Tuesday, November 19, 2002 01:35 AM

I'm writing an application using JDK1.3 where I'm showing the activities done by the application in a JTextArea.

Whenever any error occurs in the application, i want to show the error dialog and exit the program.

But before terminating the application, user should be able to scroll through the JTextArea which is present int he parent frame, to see the activities done by the application.

Can anybody throw some light how to do it???

Re: How to write a Dialog Box???

Posted By:   George_Tzallas  
Posted On:   Wednesday, November 20, 2002 01:32 AM


If you give access to the parent frame, when an error condition has occured and you
want to terminate it, then when will you know when the user is done scrolling your
log panel(JTextArea)?

Wouldn't it be easier, from a usability perspective as well, to present the log on the error
dialog --say have a tabbed pane in the dialog with two tabs, one with the error message,
and the other one with a copy of the JTextArea?

Then users will be able to inspect what has happened, and when they confirm that they are done
with the dialog, you can also terminate your application.

I think this is what we tend to see, and is much more usable, and much easier to implement.

Best regards

George T

About | Sitemap | Contact