How can I pass a JPanel through different methods:
I am doing it like this:
in the main panel method:
and in the method createRightPanel() I am returning like this:Code:mainPanel.add(createRightPanel(), BorderLayout.EAST);
but it doesn't work.Code:return createRightPanel();