I would like for my code below to display the word middle right below the word top. I can't figure out how to do this.
import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Label extends JFrame { private Container c; private JLabel n,w; public Label (String t) { super(t); setSize(400,200); c = getContentPane(); c.setLayout(new BorderLayout()); n = new JLabel("Top"); n.setHorizontalAlignment(SwingConstants.LEFT); w = new JLabel("Middle"); w.setHorizontalAlignment(SwingConstants.LEFT); c.add(n, BorderLayout.NORTH); c.add(w, BorderLayout.WEST); setVisible(true); } public static void main (String[] args) { Label bl = new Label("Layout"); bl.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } }