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 / First Aid / August 2006

Tip: Looking for answers? Try searching our database.

Swing dialog(?) question

Thread view: 
e_matthes@hotmail.com - 30 Aug 2006 17:31 GMT
Hello everyone,

The gui I have created has become too crowded with buttons and sliders
and such, so I want to move much of the control to a menu bar.  I
understand how to create a menu bar, but I have a general question
about how to use the menu bar effectively.  In many windows programs,
when you click on "Save As", a new window pops up containing the gui
specific to saving.  This is the kind of control I want to develop;
clicking "Draw Options" from a menu bar will bring up a window with a
Scale slider, and a Rotate slider, etc.

I am thinking of doing this by having the menu bar button create a new
JPanel which contains the appropriate controls.  Is this a reasonable
approach, or is there a more standard/ efficient way of creating these
kinds of control boxes?  Also, are these "Save As" boxes called dialog
boxes, or something else?

Eric

BTW, I don't need any code examples, just a little perspective on which
direction to head with this.  Thank you.
Natasha Lloyd - 30 Aug 2006 17:41 GMT
e_matt...@hotmail.com wrote:
> I am thinking of doing this by having the menu bar button create a new
> JPanel which contains the appropriate controls.  Is this a reasonable
> approach, or is there a more standard/ efficient way of creating these
> kinds of control boxes?

A JPanel alone will not be enough. You should probably place your
controls inside a JDialog. You can read all about how to use JDialogs
here:
http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html
.

>Also, are these "Save As" boxes called dialog
> boxes, or something else?

The "Save As..." dialog is a JFileChooser. Again, check the Java docs
for more information about it.

Hope that helps...

- Natasha -


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.