java jlabel border code example Example: java jlabel border textLabel.setBorder(BorderFactory.createLineBorder(Color.YELLOW, 5));