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 / General / September 2006

Tip: Looking for answers? Try searching our database.

looking for a class

Thread view: 
Justin - 26 Sep 2006 18:18 GMT
I am looking for a class that I can create an option window.  It should
be like a JOptionPane, however, I want to be able to add and catch
multiple fields and field values.

thanks
Rhino - 26 Sep 2006 19:42 GMT
>I am looking for a class that I can create an option window.  It should
> be like a JOptionPane, however, I want to be able to add and catch
> multiple fields and field values.

I think you want a JDialog or maybe a JFrame.

--
Rhino
Thomas Kellerer - 26 Sep 2006 23:01 GMT
Justin wrote on 26.09.2006 19:18:
> I am looking for a class that I can create an option window.  It should
> be like a JOptionPane, however, I want to be able to add and catch
> multiple fields and field values.
>
> thanks

You can pass a JPanel to a JOptionPane. You are not restricted to String objects
for the "message" parameter. That JPanel can contain multiple fields and field
values

Thomas
Ian Wilson - 27 Sep 2006 10:41 GMT
> Justin wrote on 26.09.2006 19:18:

The subject line was rather feeble. I've amended it.

>> I am looking for a class that I can create an option window.  It should
>> be like a JOptionPane, however, I want to be able to add and catch
[quoted text clipped - 5 lines]
> objects for the "message" parameter. That JPanel can contain multiple
> fields and field values

This is true, I've done it, but I learned to be wary of it.

It is worth noting that if you later want to add an InputValidator to
your panel, you'll be better off with a JDialog because you can't apply
setVerifyInputWhenFocusTarget(false) to the "Cancel" button of a
JOptionPane constructed using the static methods like showConfirmDialog.

There are several other things that are hard to do when you have no
instance variable for the dialog and can't get at it's innards.

My conclusion is that use of JOptionPane is best reserved for dialogs
with simple content.


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



©2008 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.