Answers for "how to make more than one jlabel at once in java"

0

how to make more than one jlabel at once in java

final JPanel labelPanel = new JPanel(new BorderLayout());
    panel.add(labelPanel, BorderLayout.NORTH);

    JLabel[] dashedLineLabel = new JLabel[wordLength];

    for (int i = 0; i < wordLength; i++)
    {   
        dashedLineLabel[i] = new JLabel("__  ");
        dashedLineLabel[i].setFont(new Font("Serif", Font.BOLD, 30));
        labelPanel.add(dashedLineLabel[i]);
    }
Posted by: Guest on May-11-2021

Code answers related to "how to make more than one jlabel at once in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language