Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / December 2003

Tip: Looking for answers? Try searching our database.

JOptionPane.showInternalMessageDialog OK button doesn't get focus

Thread view: 
Jim Cobban - 11 Dec 2003 21:51 GMT
I am creating a message dialog using JOptionPane but I am encountering a
usability problem because the OK button is not getting the focus when the
dialog is displayed.  As a result the user must use the mouse to close the
dialog.  I suspect the problem is arising because the message is not a
simple String, but rather a JTextArea inside a JScrollPane.

How do I set up the dialog so that the OK button gets the focus when it is
displayed?

Signature

Jim Cobban   jcobban@magma.ca
34 Palomino Dr.
Kanata, ON, CANADA
K2M 1M1
+1-613-592-9438

Andrew Thompson - 12 Dec 2003 05:30 GMT
> I am creating a message dialog using JOptionPane but I am encountering a
> usability problem

Short answer, I don't know.

Long answer.  I have found that as soon as you
ask the question 'How can I make a JOptionPane..'
that is a sign that using a JDialog would be quicker.

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
Jim Cobban - 12 Dec 2003 22:31 GMT
> > I am creating a message dialog using JOptionPane but I am encountering a
> > usability problem
>
> Long answer.  I have found that as soon as you
> ask the question 'How can I make a JOptionPane..'
> that is a sign that using a JDialog would be quicker.

I cannot use JDialog because I have to instantiate the dialog inside a
JInternalFrame.  That is what the JOptionPane.showInternalMessageDialog
method does.  I understand your comment.  I have given up on JOptionPane for
a lot of what I do, but it is still convenient for simple dialogs, such as
just popping up a message.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.