Why is the JSeparator not displayed as a horizontal line?

84 Views Asked by At

Here are the relevant parts of my code:

JPanel panel = new JPanel(new FlowLayout());
JLabel label1 = new JLabel("INFO");
JLabel label2 = new JLabel("TEXT");

panel.add(label1);
panel.add(new JSeparator());
panel.add(label2);

No horizontal line is displayed. Any help?

0

There are 0 best solutions below