Exactly, except the panel has been added to BorderLayout CENTER so will fill the frame,
so would have to do something like frame.getContentPane().setLayout(new FlowLayout())
in addition to the panel.setBorder(BorderFactory.createEtchedBorder()) or whatever.