This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 29749 - Problem with form file
Summary: Problem with form file
Status: CLOSED DUPLICATE of bug 27936
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC Other
: P2 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-31 14:11 UTC by vbrabant
Modified: 2003-10-16 12:49 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vbrabant 2002-12-31 14:11:41 UTC
Mike ulse detected a problem with nb341.
I think it's a blocking problem and must be
resolved before final release of nb341

herafter the description of the problem:


Hi,

I am having troubles keeping my menu on a JApplet.
 I had a menu
that I was editing.  I compiled and tested my
applet and everything
was fine.  I had closed the file in NB.  When I
re-opened it the
form did not have my menu.  I found the menu in
the Component
inspector listed under Other Components instead of
under JApplet.

Luckily I had an older version of the form file
and I compared the two
versions.  A portion of the version that doesn't
work looks like

 </NonVisualComponents>
 <AuxValues>
   <AuxValue name="designerSize"
type="java.awt.Dimension"
value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,

2

,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-104,0,0,2,120"/>
   <AuxValue
name="RADVisualFormContainer_MenuComponent"
type="java.lang.String" value="jMenuBar1"/>
 </AuxValues>

I can edit it to look like the older version as

 </NonVisualComponents>
 <SyntheticProperties>
   <SyntheticProperty name="menuBar"
type="java.lang.String" value="jMenuBar1"/>
   <SyntheticProperty name="designerSize"
type="java.awt.Dimension"
value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,

2

,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-104,0,0,2,120"/>
 </SyntheticProperties>

 <AuxValues>
   <AuxValue
name="RADVisualFormContainer_MenuComponent"
type="java.lang.String" value="jMenuBar1"/>
 </AuxValues>

and then I can open my file and edit, compile and
run my applet with the menu.  But when I close my file
the <SyntheticProperties> is once again deleted.

How can I fix this?

Thanks in advance,

Mike
Comment 1 vbrabant 2002-12-31 14:14:29 UTC
hereafter steps to reproduce the problem, thanks to mike

Mike Hulse wrote:

I thought the problem of NB deleting my menu was because I imported
into the new release.  So I created a test with the same problem.  The
test
contains only NB generated code and was very simple to reproduce.

1) New JApplet - using all NB defaults
2) Using the Form Editor - from the component palette -- added JMenuBar
3) From the component inspector -- added several JMenus with modified text
3) Also, from the component palette, added several JLabels and JPanels
    modifying some of the JLabels.
4) Saved and compiled.  Everything looks good.
5) Closed my JApplet from the source editor (GUI Editing)
6) Re-open my JApplet and now in the Form Editor the menu is gone.

Now, the Component Inspector lists the JMenuBar under "Other Components"
whereas previously it was listed under JApplet.  I have attached
before and
after files of the .form and .java files.  The before are the files as
I created them.
The after are the files are the files that were closed and then
reopened.  The
only changes I noticed were in the .java files.  NB had omitted the
setJMenuBar()
and re-arranged some things.

Unlike the imported file that I could fix by  adding the
SyntheticProperties back,
I cannot fix this.  Is there a workaround?  Am I doing something
wrong?  Please
let me know how I can fix this.

Thanks any help in this matter,

Mike Hulse
Systems Programmer
Alcoa Richmond Data Center

Comment 2 _ mihmax 2003-01-01 13:25:36 UTC
Mike, Vincent, Happy New 2003!

I can confirm that it's reproducible by the Mike's steps, and also in
NetBeans 3.4, so this is not 3.4.1-specific.

What's most strange, that even when the form opens w/o the menu, still
if you don't change it, the line "setJMenuBar(..)" is there in
initComponents. Only at a time you change a form, this line is removed.

What's that, Form guys?
You too, happy 2003!
Comment 3 _ mihmax 2003-01-02 18:21:29 UTC

*** This issue has been marked as a duplicate of 27936 ***
Comment 4 Jaromir Uhrik 2003-10-16 12:49:17 UTC
Closed - duplicate.