Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to set empty Border in JDialog?

 
Volodymyr Lysenko
Ranch Hand
Posts: 511
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Rob Camick
Ranch Hand
Posts: 2580
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This will remove the Border and the title bar. There is no way to just remove the border.
 
Volodymyr Lysenko
Ranch Hand
Posts: 511
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2580
9
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The content pane of a frame of dialog is a JPanel:
 
Volodymyr Lysenko
Ranch Hand
Posts: 511
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow!

I didn't know of that!

Thanks a lot!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic