Add Border to JPanel
Borders are basically margined around the edges of a Swing component. Borders are useful for providing titles and empty spaces around components. The setBorder() is used to put a border around a component. Borders in JPanel Example import java.awt.*; import javax.swing.*; import javax.swing.border.*; import java.awt.event.*; public class VariousBorders extends JPanel { Border border; JButton butn; … Read more