import javax.swing.*; import java.awt.*; public class HoldAnotherLabel extends JPanel { JLabel l1; Font creditFont = new Font("Arial", Font.BOLD, 12); public HoldAnotherLabel() { setLayout(new FlowLayout(FlowLayout.CENTER)); setBackground(Color.BLACK); setBorder(BorderFactory.createLineBorder(Color.WHITE,2)); setOpaque(true); setSize(500, 75); setLocation(50, 550); setVisible(true); l1 = new JLabel("Crazy Laws Information provided by www.crazylaws.com", JLabel.CENTER); l1.setBackground(Color.BLACK); l1.setFont(creditFont); l1.setPreferredSize(new Dimension(350, 50)); l1.setForeground(Color.WHITE); l1.setOpaque(true); add(l1); } }