Se le JTextArea laterali sono vuote , il componente centrale tende ad occupare tutto lo spaziocodice:import javax.swing.JTextArea; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import java.awt.Color; import java.awt.BorderLayout; public class Bordi { public static void main (String[] args) { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE ); JTextArea lineNorth = new JTextArea("Nord"); lineNorth.setEditable(true); lineNorth.setBackground(Color.darkGray); lineNorth.setSize(300,30); JTextArea lineSide = new JTextArea("Laterale"); lineSide.setEditable(true); lineSide.setBackground(Color.darkGray); JTextArea lineSide2= new JTextArea("Laterale"); lineSide2.setEditable(true); lineSide2.setBackground(Color.darkGray); lineSide.setSize(30,300); JPanel mEditor = new JPanel(); mEditor.setLayout(new BorderLayout()); JTextArea editor = new JTextArea("Centro"); JScrollPane editorScroll = new JScrollPane(); editorScroll.add(editor); mEditor.add(lineSide, "West"); mEditor.add(lineSide2, "East"); mEditor.add(lineNorth, "North"); mEditor.add(editor,"Center"); frame.getContentPane().add(mEditor); frame.setSize(300,300); frame.show(); } }