Skip to main content



      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 13:26 Go to next message
Eclipse UserFriend
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 15:24 Go to previous messageGo to next message
Eclipse UserFriend
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 14:23 Go to previous messageGo to next message
Eclipse UserFriend
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 16:02 Go to previous messageGo to next message
Eclipse UserFriend
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 14:56 Go to previous messageGo to next message
Eclipse UserFriend
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 15:47 Go to previous message
Eclipse UserFriend
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: Tue Nov 04 12:38:51 EST 2025

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

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

Back to the top