Two Laptop Bag
The moose likes Swing / AWT / SWT and the fly likes JFrame vs JPanel Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply 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
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

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

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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: JFrame vs JPanel
 
Similar Threads
JFrames Within Applets/JApplets
[Netbeans] java Code
How do you switch JPanels to be shown within the same JFrame
Swing
Rescalling JComponents