Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

setting horizontal and vertical margins

What is the method to set horizontal and vertical margins in a panel? (The same we have in html style="margins:30px")

like image 571
Suhail Gupta Avatar asked May 02 '11 06:05

Suhail Gupta


People also ask

How do you set the margins?

On the Page Layout tab, in the Page Setup group, choose Margins and the Margins gallery appears. At the bottom of the Margins gallery, choose Custom Margins. In the Page Setup dialog box, enter new values for the margins.

Where is the margin of a document?

Margins are the blank spaces that line the top, bottom, and left and right sides of a document. They are important because they help make a document look neat and professional. To change margins, click on the Margins button, found on the Page Layout tab.


1 Answers

setBorder(BorderFactory.createEmptyBorder(int top, int left, int bottom, int right));

And for more details you can read the documentation about BorderFactory

like image 124
Suhail Gupta Avatar answered Oct 14 '22 08:10

Suhail Gupta