This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JOptionPane without a button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JOptionPane without a button" Watch "JOptionPane without a button" New topic
Author

JOptionPane without a button

Barry Brashear
Ranch Hand

Joined: Jun 05, 2001
Posts: 303
Is it possible to instantiate a JOptionPane with either no button or have
the button invisible.?

Thanks.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Nope. Easiest way to get what you want is to use a JDialog. You can just create a class that extends JDialog. Treat everything in that class just like coding for a JFrame and don't put any buttons on it.


GenRocket - Experts at Building Test Data
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JOptionPane without a button