• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTree in JOptionPane  RSS feed

 
Jain Neeraj
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm having a JTree in a JOptionPane.showOptionDialog(...). My problem is when i double click on the leaf of the tree (thta's some data) the Dialog Box should disappear (like u hit the OK button). Any clues...
Thanks,
N.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're going to have to use a JDialog and build all of the fuctionality yourself. All JOptionPane is is a "standard" JDialog. Since the functionality you want is not "standard", you're going to have to build it yourself.

-Nate
 
Jain Neeraj
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes i follows the same approach (creating a new JDialog) and implemented all the required functionality ,
Thanks for ur suggestion,
N.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!