Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » Swing JFrame vs Application Window templates(Which should I use?)
Swing JFrame vs Application Window templates [message #756272] Fri, 11 November 2011 18:26 Go to next message
someone  is currently offline someone Friend
Messages: 19
Registered: July 2009
Junior Member
I can't figure out which template should I prefer for the main window of a swing application...
Should I prefer to use the JFrame template or the Application Window template?
I can't figure out why should I prefer the code one or the other generates...
In case it matters I prefer using GroupLayout.
Re: Swing JFrame vs Application Window templates [message #756300 is a reply to message #756272] Fri, 11 November 2011 20:24 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
It doesn't really matter. I usually pick JFrame.
Re: Swing JFrame vs Application Window templates [message #759139 is a reply to message #756300] Sat, 26 November 2011 19:23 Go to previous messageGo to next message
someone  is currently offline someone Friend
Messages: 19
Registered: July 2009
Junior Member
Eric Clayberg wrote on Fri, 11 November 2011 22:24
It doesn't really matter. I usually pick JFrame.

Hmm it seems the JFrame wizard has an option to use an "Advanced Template" which adds a 5px invisible border and replaces the contentPane with a JPanel.

It made me wonder is there any function in WindowBuilder that allows you to replace the content pane with a different component and update all the components so that they are added to it instead?
Re: Swing JFrame vs Application Window templates [message #759141 is a reply to message #759139] Sat, 26 November 2011 21:02 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
Have you tried the Morph command?
Re: Swing JFrame vs Application Window templates [message #759500 is a reply to message #759141] Mon, 28 November 2011 19:56 Go to previous messageGo to next message
someone  is currently offline someone Friend
Messages: 19
Registered: July 2009
Junior Member
I tried it, it doesn't appear at all for a JFrame using getContentPane().
and ones that use the advanced JFrame template and as such use a new contentPane can only be morphed to other types similar to a JPanel (The menu shows JLayeredPane) but not to use getContentPane().
Re: Swing JFrame vs Application Window templates [message #759512 is a reply to message #759500] Mon, 28 November 2011 20:47 Go to previous message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
The Morph command would seem to be what you are looking for. At least, that did what you originally asked (and, yes, you should be using the advanced template in that case). Your other option (which you always have) is to modify the code in the source view.
Previous Topic:WindowBuilder from source code
Next Topic:No root methods when designing a class which implements IDetailsPage and extends a bean
Goto Forum:
  


Current Time: Thu Apr 18 13:33:23 GMT 2024

Powered by FUDForum. Page generated in 0.02088 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top