This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Setting an option window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Setting an option window" Watch "Setting an option window" New topic

Setting an option window

Mohamed Desoky

Joined: Sep 10, 2011
Posts: 1

Hi, I'm new I GUI programming, I'm using netbeans, and need help of getting Input from an option window.
My Idea is to make an options window that contains two combo-boxes , OK, and cancel buttons.
How can I return the input of this window the main window of the program, will it be a frame or dialog, don't Know.
Please help.
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2154
Create a JPanel that contains the two combo boxes. Then you can add the panel to a JOptionPane.

See How to Make Dialogs for more information on using an option pane.
Darryl Burke

Joined: May 03, 2008
Posts: 4523

Mohamed, we don't have too many rules here but we do ask that you BeForthrightWhenCrossPostingToOtherSites

luck, db
There are no new questions, but there may be new answers.
It is sorta covered in the JavaRanch Style Guide.
subject: Setting an option window
Similar Threads
To resize the popup window and activate the close button
How to add a new window on existing one
input from a new window
refresh parent window from child window
Fetching values from database and populating it in drop down and text fields