Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes JFrame vs JPanel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFrame vs JPanel" Watch "JFrame vs JPanel" New topic
Author

JFrame vs JPanel

Jason Moore
Greenhorn

Joined: Sep 11, 2001
Posts: 10
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
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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


GenRocket - Experts at Building Test Data
anandh
Greenhorn

Joined: Sep 06, 2001
Posts: 22
I personally would prefer having least number of components. Just one frame and rest of them panels/panes whatever.
Again, just my 2 paisas
 
jQuery in Action, 2nd edition
 
subject: JFrame vs JPanel
 
Similar Threads
JFrames Within Applets/JApplets
Swing
[Netbeans] java Code
How do you switch JPanels to be shown within the same JFrame
Rescalling JComponents