0

I wanna know what is the difference between JFrame and Jpanel in simpler way I used to work with Application Form in VS and it's not the same for what I see I have hard time to figure if I should use Jframe or jpanel and which has the priority in codes

I'm trying my best with java

shakespeare
  • 126
  • 11

1 Answers1

1

JFrame is the actual frame, the window that pops up. JPanel is the layout inside the frame, so you can add multiple JComponents to a JPanel and organize them instead of only one component in JFrame. You can add multiple JPanels in a JFrame.

Nadav Tasher
  • 147
  • 6
  • you should mention in your post that one can add multiple JPanels in a JFrame. –  Apr 27 '17 at 06:08