|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.04604 seconds