facebook

Adding a form to the custom palette…JDK 6?

  1. MyEclipse Archived
  2.  > 
  3. Matisse/Swing UI Development
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #272980 Reply

    jhoffman
    Member

    I created a JPanel form, and I want to use it on another form. I added it to the palette as a form, per the directions. However, when I click on it in the palette, it does not allow me to add it to my form. I get no errors or anything.

    The panel is defined in a different project in the same workspace. Is this a problem? Any other suggestions?

    Thanks,

    Jeff

    #273627 Reply

    Riyad Kalla
    Member

    Jeff,
    I am really sorry your post never got answered.

    Using MyEclipse 6.0 (soon to be released) I wasn’t able to reproduce this problem using JRE 1.5.0_11

    See attached screenshot *and* the attached sample projects that I used that you can import and try:

    Attachments:
    You must be logged in to view attached files.
    #277415 Reply

    leebulmer
    Member

    This message has not been recovered.

    #277440 Reply

    Riyad Kalla
    Member

    Lee that is certainly strange. You can go to MyEcipse > Installation Summary > Installation Details > Error Log to view the error log from inside MyEclipse… look down near the bottom… any interesitng entries?

    #277458 Reply

    leebulmer
    Member

    @support-rkalla wrote:

    Lee that is certainly strange. You can go to MyEcipse > Installation Summary > Installation Details > Error Log to view the error log from inside MyEclipse… look down near the bottom… any interesitng entries?

    Nothing gets added to the log (in relation to this problem) as far as I can tell. I just went through it all again. The last entry in the log before I started was:

    !ENTRY org.eclipse.core.resources 2 1 2007-10-25 08:57:10.401
    !MESSAGE Skipping builder ‘com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder’ for project ‘pcs’. Either the builder is missing from the install, or it belongs to a project nature that is missing or disabled.

    I then:

    1. Created a new matisse form (A JFrame) called BlankForm in a new project
    2. Opened “manage palette…”
    3. Clicked “Add form…”
    4. Browsed to the TestPanel.form in the M4MTestJava1 project and double clicked it
    5. Clicked Ok in the “manage palette…” form
    6. Opened BlankForm.form in M4M
    7. Dragged TestPanel from the palette onto the form, nothing happens
    8. Select TestPanel in the palette and then click on the form, nothing happens

    After these events, the last entry in my log file is:

    !ENTRY org.eclipse.core.resources 2 1 2007-10-25 08:57:10.401
    !MESSAGE Skipping builder ‘com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder’ for project ‘pcs’. Either the builder is missing from the install, or it belongs to a project nature that is missing or disabled.

    So, nothing has been added! :-S

    I don’t really know what else to try, to be honest. Any suggestions greatly appreciated, because I’m on a deadline and I really don’t want to have to start using NetBeans if at all possible…

    #277495 Reply

    Riyad Kalla
    Member

    Ahh wait I thikn I see the problem.

    You are adding the Panel from another project to the palette, and then trying to use it in another project…

    Try your same steps but put *everything* in the same project so all the classes are there and can be resolved by the designer.

    #277540 Reply

    leebulmer
    Member

    Hi Riyad,

    Thanks for the reply. Unfortunately, this doesn’t make a difference. It’s actually where I started from, I only put the Panel to another project because that’s what you did in the example above. So I thought I was wrong to have them in the same project. Alas, I get the same behaviour regardless of which project the Panel is in.

    I’ve tried to walkthrough the issue with screenshots for you:

    Step 1: Create a New Project

    [URL=http://img98.imageshack.us/my.php?image=createprojectet6.png][/URL]

    Step 2: Create a new JPanel (TestPanel)

    [URL=http://img98.imageshack.us/my.php?image=createpanelfn2.png][/URL]

    Step 3: Add a label and a button to the new Panel

    [URL=http://img100.imageshack.us/my.php?image=drawnpaneloj0.png][/URL]

    Step 4: Create a new JFrame (BlankForm)

    [URL=http://img139.imageshack.us/my.php?image=creatingformbi4.png][/URL]

    Step 5: Add the TestPanel to the palette

    [URL=http://img150.imageshack.us/my.php?image=addingtopaletteor7.png][/URL]

    Step 6: Drag the TestPanel from the palette onto the Test form

    [URL=http://img136.imageshack.us/my.php?image=afteraddnc1.png][/URL]

    Step 7: Run the application (right click: Run As->Java Application on BlankForm.java)

    [URL=http://img149.imageshack.us/my.php?image=runningapplicationyi4.png][/URL]

    As you can hopefully see, the panel isn’t appearing in the JFrame when I run the application. However, an outline of it appears on BlankForm. This is more than I have managed to get to happen before, normally nothing happens. I checked inside BlankForm and it does appear to have added the Panel, because it has this section:

    <SubComponents>
    <Container class=”TestPanel” name=”testPanel1″>

    <Layout>
    <DimensionLayout dim=”0″>
    <Group type=”103″ groupAlignment=”0″ attributes=”0″>
    <EmptySpace min=”0″ pref=”400″ max=”32767″ attributes=”0″/>
    </Group>
    </DimensionLayout>
    <DimensionLayout dim=”1″>
    <Group type=”103″ groupAlignment=”0″ attributes=”0″>
    <EmptySpace min=”0″ pref=”300″ max=”32767″ attributes=”0″/>
    </Group>
    </DimensionLayout>
    </Layout>
    </Container>
    </SubComponents>

    FWIW, when I try to copy my original (more complex) panel into this project, it doesn’t seem to add to the form at all:

    Step 8: Copy more complex JPanel over:

    [URL=http://img522.imageshack.us/my.php?image=pluginpaneladdedot7.png][/URL]

    Step 9: Add this to the palette (as above)

    Step 10: Trying to add to BlankForm causes no change to to the form in designer or source view. No outline of this panel appears. I also opened it in notepad and there is no change to the underlying XML :-S

    #277641 Reply

    Riyad Kalla
    Member

    This message has not been recovered.

    #278754 Reply

    Joel
    Member

    I am also getting this same error. The difference is JDK 6. If I set back the compatibility to 1.5 then everything works just fine. However in 6 I get the error:

    Cannot load component class <class name> from project: <project location> The class must be compiled and must be on the classpath of the project this form belongs to.

    All the forms are in the same project, same package too.

    #278852 Reply

    Riyad Kalla
    Member

    guurk,
    Sorry you ran into this, Using JDK 6 with some of MyEclipse is a known problem. We will likely work on certifying MyEclipse with Java 6 (to be run with it) with the 7.0 release.

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Adding a form to the custom palette…JDK 6?

You must be logged in to post in the forum log in