Broken GUI Editor after adding field to frame. [message #145777] |
Wed, 18 March 2009 22:21 |
JC Messages: 10 Registered: July 2009 |
Junior Member |
|
|
Hi,
I used VE to create a new JFrame. I then added a custom private member
field (just after serialVersionUID), and added a parameter to the
constructor to initialize it (initialized between super() and initialize()
call in constructor).
When I did that, the frame in the editor shrunk to 0 size. Figuring I
broke something I undid my changes, restoring the file to it's state
before I added the custom field.
Now, the frame is blank in the visual editor; none of my components are on
it. The title is set to "(no title set for window in visual editor)". The
tool tip that displays when I hover over the frame is "Round Tripping is
stopped". The only item in the JavaBeans view is labeled "this"; there are
no other components in the tree. However, the code for all the components
is still in the file, and when I run the application the actual form with
all the components displays correctly.
The editor seems to no longer be aware of what's on the frame. Closing and
reopening the editor did not fix the problem. Restarting Eclipse did not
fix the problem. I can now no longer edit the GUI in visual editor, and am
dead in the water and have to stop working early today. How do I fix this?
Also, in the future, how do I add custom fields to the frame class?
Thanks,
MB
|
|
|
|
Re: Broken GUI Editor after adding field to frame. [message #145823 is a reply to message #145786] |
Thu, 19 March 2009 13:59 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Hi,
You should be able to add custom fields with no problem. The problem was
probably due to the change to the constructor from the default to one
that takes a parameter. Typically to be able to be used in the VE there
should be at least a default ctor that doesn't take any parameters.
mnbv wrote:
> I was able to fix the problem by closing the editor, cleaning the
> project, then reopening the editor.
>
> Thanks,
> MB
>
--
Thanks,
Rich Kulp
|
|
|
|
Re: Broken GUI Editor after adding field to frame. [message #617340 is a reply to message #145786] |
Thu, 19 March 2009 13:59 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Hi,
You should be able to add custom fields with no problem. The problem was
probably due to the change to the constructor from the default to one
that takes a parameter. Typically to be able to be used in the VE there
should be at least a default ctor that doesn't take any parameters.
mnbv wrote:
> I was able to fix the problem by closing the editor, cleaning the
> project, then reopening the editor.
>
> Thanks,
> MB
>
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.03246 seconds