Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFrame vs JPanel

 
Jason Moore
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm working with some legacy code that was designed poorly. Instead of using mulitple JPanels and switching between them on a single JFrame, every "screen" is implemented using its own JFrame. Then each frame is hidden/shown when needed. Is there enough benefit in using JPanels over JFrames to go back and rewrite this code?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am by no means am expert in development, however, my opinion is that if the interface is understandable and funcional and is somewhat user friendly, I see no need to go back and redo the code.
The only reason I see in changing, is if you see a change in the software in the near future that would require a JTabbedPane. Then, you should probably get starting on the integration now.
Just my two cents

------------------
Happy Coding,
Gregg Bolinger
 
anandh
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I personally would prefer having least number of components. Just one frame and rest of them panels/panes whatever.
Again, just my 2 paisas
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic