Suzon
Suzon

Reputation: 759

Remove the title bar from JOptionPane

Is there any way to remove the title bar from JOptionPane?

I need to create an option pane without option title bar.

Upvotes: 0

Views: 1702

Answers (1)

desperateCoder
desperateCoder

Reputation: 700

Do you have to use a JOptionPane?

You can use a J(Internal)Frame or a splashscreen without window-decoration, too!

JInternalFrame inFrame = new JInternalFrame();  
BasicInternalFrameTitlePane titlePane =  
      (BasicInternalFrameTitlePane) ((BasicInternalFrameUI) inFrame.getUI()).  
      getNorthPane();  
inFrame.remove(titlePane);  

Upvotes: 2

Related Questions