import javax.swing.*; import java.awt.*; import javax.swing.border.*; class Program { public static void main(String args[]) { JFrame ablak = new JFrame("Szegély példa"); JLabel cimke = new JLabel("Felirat"); Border a = BorderFactory.createLineBorder(Color.black); ablak.setLayout(null); cimke.setBorder(a); cimke.setBounds(10, 10, 80, 20); ablak.add(cimke); ablak.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ablak.setSize(400,300); ablak.setVisible(true); } }