Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java jlabel border


JLabel textLabel = new JLabel("Welcome Child",SwingConstants.CENTER);
textLabel.setForeground(Color.YELLOW);
textLabel.setBorder(BorderFactory.createLineBorder(Color.YELLOW, 5));

JPanel textPanel = new JPanel(new GridBagLayout());
textPanel.add(textLabel);
textPanel.setPreferredSize(new Dimension(300, 100));

frame.getContentPane().add(textPanel, BorderLayout.CENTER);

Source by nullorempty.org #
 
PREVIOUS NEXT
Tagged: #java #jlabel #border
ADD COMMENT
Topic
Name
6+3 =