I have this \"main\" panel (let\'s call it AAA) with BorderLayout, and two panels (BBB and CCC) in it:
public class AAA extends JPanel {
I managed to do this. I simply passed the Center panel as a parameter in the North panel's constructor. It works perfectly. Thank you all for the answers :)