• Post Reply Bookmark Topic Watch Topic
  • New Topic

Clarify JPane/JPanel sticking point  RSS feed

 
Tom Landry
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The way I am understanding it you have a JFrame with a default panel/pane (JRootPane) on which there is a a default layout manager.

The JFrame has its setVisible to true and ta da it is displayed.

Makes sense, but then I read about JOptionPane and you have showMessageDialog and showConfirmDialog and others....



Then I am thinking:
Hey, how can you simply display a pane without a Frame? I thought Frames have a Panel/Pane, but JoptionPane seems to have its own JFrame.
 
Rob Spoor
Sheriff
Posts: 20903
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not a JFrame but a JDialog. JOptionPane has even public createDialog methods to create them.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!