wood burning stoves*
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 Levytskyi
Ranch Hand

Joined: Mar 29, 2012
Posts: 505
    
    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: 2180
    
    7


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

Joined: Mar 29, 2012
Posts: 505
    
    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: 2180
    
    7
The content pane of a frame of dialog is a JPanel:
Volodymyr Levytskyi
Ranch Hand

Joined: Mar 29, 2012
Posts: 505
    
    1

Wow!

I didn't know of that!

Thanks a lot!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to set empty Border in JDialog?