Suhail Gupta Suhail Gupta - 1 year ago 61
Java Question

setting horizontal and verical margins

What is the method to set horizontal and vertical margins in a panel? (The same we have in html


Answer Source

use setBorder(BorderFactory.createEmptyBorder(int top, int left, int bottom, int right); for more reference visit this.