how to make more than one jlabel at once in java

Solutions on MaxInterview for how to make more than one jlabel at once in java by the best coders in the world

showing results for - "how to make more than one jlabel at once in java"
Mckayla
17 Oct 2018
1    final JPanel labelPanel = new JPanel(new BorderLayout());
2    panel.add(labelPanel, BorderLayout.NORTH);
3
4    JLabel[] dashedLineLabel = new JLabel[wordLength];
5
6    for (int i = 0; i < wordLength; i++)
7    {   
8        dashedLineLabel[i] = new JLabel("__  ");
9        dashedLineLabel[i].setFont(new Font("Serif", Font.BOLD, 30));
10        labelPanel.add(dashedLineLabel[i]);
11    }   
12
similar questions