Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Swing / AWT / SWT and the fly likes How to set empty Border in JDialog? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to set empty Border in JDialog?" Watch "How to set empty Border in JDialog?" New topic
Author

How to set empty Border in JDialog?

Volodymyr Lysenko
Ranch Hand

Joined: Mar 29, 2012
Posts: 511
    
    1

Hello!

I do not understand how to set empty Border in JDialog as I did it for JPanel.

There is no method setBorder in JDialog.

I did not find solution on the Internet .

Thanks!


True person is moral, false is right!
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2372
    
    8


This will remove the Border and the title bar. There is no way to just remove the border.
Volodymyr Lysenko
Ranch Hand

Joined: Mar 29, 2012
Posts: 511
    
    1

Thanks for reply!

No I meant empty border tha takes space around content of jdialog.
I want to set border like this :

BorderFactory.createEmptyBorder(10,10,10,0);
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2372
    
    8
The content pane of a frame of dialog is a JPanel:
Volodymyr Lysenko
Ranch Hand

Joined: Mar 29, 2012
Posts: 511
    
    1

Wow!

I didn't know of that!

Thanks a lot!
 
Have you checked out Aspose?
 
subject: How to set empty Border in JDialog?
 
It's not a secret anymore!