0

I am designing my GUI in netbeans IDE editor. In editor i placed JPanel into JFrame. In code I have:

setContentPane(jPanel1);

after this, jPanel1 is spreaded over JFrame.

How can I position the JPanel, best with layouts, so it does not spread and overlay other components?

Paul Samsotha
  • 205,037
  • 37
  • 486
  • 720

1 Answers1

0

To prevent overlaying just add other componets after you set contentPane to JFrame. More precisely jpanel1 does not overlay other components, it substitutes the old content panel, containing your components.

PKopachevsky
  • 262
  • 1
  • 6