Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » How to avoid default container for JFRAME and for all others also
icon5.gif  How to avoid default container for JFRAME and for all others also [message #774032] Tue, 03 January 2012 06:00 Go to next message
santosh guptha is currently offline santosh gupthaFriend
Messages: 5
Registered: January 2012
Junior Member
When I want to add jsplit pane to the jframe it is getting added as sub component of jpanel( which is associated with jframe by default ) and moreover the jsplitpane is coming two default buttons, Can

[Updated on: Tue, 03 January 2012 06:01]

Report message to a moderator

Re: How to avoid default container for JFRAME and for all others also [message #774206 is a reply to message #774032] Tue, 03 January 2012 13:59 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
I'm not sure what you are trying to do or why you are tying to do it. Please provide a more detailed explanation or a test case that illustrates the problem you are having and why you think it is a problem.
Re: How to avoid default container for JFRAME and for all others also [message #774620 is a reply to message #774206] Wed, 04 January 2012 09:48 Go to previous messageGo to next message
santosh guptha is currently offline santosh gupthaFriend
Messages: 5
Registered: January 2012
Junior Member
I want to create the same application that was given as example for swing binding, the phonebook example.

When I create JFrame, It is coming with the default container which is a Panel. But I want to make JSplitpane as the container for my frame.
To do this, I have to manually delete the Jpanel control from the code in SourceView mode. How to avoid this ??

Similarly when I drag Jsplitpane container it is loaded with two buttons by default. Please let me know how to avoid this default behavior. Do I need to change any settings in preferences ??

If you still don't understand what I am saying I will send you the screenshots of my project
Re: How to avoid default container for JFRAME and for all others also [message #774702 is a reply to message #774620] Wed, 04 January 2012 12:28 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
First of all, there is no need to remove the JPanel. You can simply add the JSplitPane to the JPanel. If you really want to get rid of the JPanel, you have several choices: 1) delete the JPanel and add the JSplitPane to the default content pane, 2) morph the JPanel into a JSplitPane, 3) use a different initial template of your choice (using a JSplitPane, for example), or 4) modify the source as you wish (that is why you have unrestricted access to the source view).

The default widgets created by a new JSplitPane are two buttons so this is the expected behavior. If you don't want either of those buttons, then simply replace them with whatever widgets you prefer.
Re: How to avoid default container for JFRAME and for all others also [message #775107 is a reply to message #774702] Thu, 05 January 2012 10:37 Go to previous messageGo to next message
santosh guptha is currently offline santosh gupthaFriend
Messages: 5
Registered: January 2012
Junior Member
I am new to this plug-in, may be I don't know how to use it.
I tried all the options that you have told me.

1) I am not able to delete the default Jpanel by right clicking on it.
2) After morphing I am not able to add anything to the Jsplitpane.
3) I don't know what do you mean by different template
4) modifying the source is an option, but I want to know other ways to do the same. Thats why I am asking you.

Please help me on this.

Thanks in advance
Re: How to avoid default container for JFRAME and for all others also [message #775249 is a reply to message #775107] Thu, 05 January 2012 16:33 Go to previous message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
1) Deleting the default JPanel by right-clicking on it worked just fine on my end. What do you mean when you say you were "not able" to do this? Was the "Delete" command not present or grayed out in some way?

2) After morphing, you would also want to reset the layout manager to the default, since a JSplitPane set to a null (absolute) layout won't accept children.

3) By "different template", I mean that you can start with any code that you like. You are not limited to creating JFrame's using the wizard supplied with WindowBuilder. You can use any starting code that you like including one that already uses a JSplitPane as its content pane.

4) Modifying the source is always an option...and one that WB works very hard to facilitate with its bi-directional, reverse engineering capabilities.

I'm still not sure why you want to replace the default content pane when simply adding a JSplitPane to the content pane would achieve the same results in the end.
Previous Topic:Eclipse Hangs when I try to modify JTable model
Next Topic:JFace
Goto Forum:
  


Current Time: Thu Mar 28 16:48:12 GMT 2024

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

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

Back to the top