This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Custom Dialog - please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Custom Dialog - please help" Watch "Custom Dialog - please help" New topic

Custom Dialog - please help

AaronMweu Munzaa

Joined: Mar 04, 2004
Posts: 8
I have a class called "MyDialog" which is basically a JPanel with 2 textfields and a checkbox in a JFrame

I want to use "JOptionPane.showOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)" in the my main class and pass an instance of "MyDialog" as "Object message" but I have ended really confused and frustrated. Anyone who can bail me out?


Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
You might consider either the hybrid or dialog options shown below. The static convenience method will require more work to extract the data from your components.
It is sorta covered in the JavaRanch Style Guide.
subject: Custom Dialog - please help
Similar Threads
Painting from one class to another
Question about JOptionPane
How to make a dialog to keep in English
Setting placement of JDialog