This week's giveaway is in the Beginning Java forum.
We're giving away four copies of Bad Programming Practices 101 (e-book) and have Karl Beecher on-line!
See this thread for details.
Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Custom Dialog - please help  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Thanks.

Aaron
 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
CLUCK LIKE A CHICKEN! Now look at this tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!