facebook

Unable to apply layout to any form

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

    Mike Groys
    Member

    After creating any form, I am unable to apply any layout other than “Free Design”. The way I am doing this is using the Outline view, right click on the container (JFrame in my case) and choosing “Set Layout.” Choosing any layout other than “Free Design” produces the following error:
    Annotation: Failed to initialize layout java.awt.GridBagLayout.
    The layout cannot be set.
    java.lang.NullPointerException
    at org.netbeans.modules.form.layoutsupport.LayoutSupportRegistry.createSupportForLayout(LayoutSupportRegistry.java:190)
    at org.netbeans.modules.form.MetaComponentCreator.setContainerLayout(MetaComponentCreator.java:931)
    at org.netbeans.modules.form.MetaComponentCreator.createAndAddComponent2(MetaComponentCreator.java:297)
    at org.netbeans.modules.form.MetaComponentCreator.access$4(MetaComponentCreator.java:291)
    at org.netbeans.modules.form.MetaComponentCreator$3.run(MetaComponentCreator.java:280)
    at org.netbeans.modules.form.FormLAF$1.run(FormLAF.java:58)
    at org.openide.util.Mutex.doEventAccess(Mutex.java:1172)
    at org.openide.util.Mutex.readAccess(Mutex.java:253)
    at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:43)
    at org.netbeans.modules.form.MetaComponentCreator.createAndAddComponent(MetaComponentCreator.java:274)
    at org.netbeans.modules.form.MetaComponentCreator.createComponent(MetaComponentCreator.java:84)
    at org.netbeans.modules.form.actions.SelectLayoutAction$LayoutActionListener.actionPerformed(SelectLayoutAction.java:210)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.AbstractButton.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    [catch] at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

    *** Date:
    Wednesday, June 20, 2007 11:07:36 AM GMT-07:00

    ** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.5.0_11

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 5.5.1 GA
    Build id: 20070521-5.5.1-GA

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 5.5.1 GA
    Build id: 20070521-5.5.1-GA

    Eclipse Platform

    Version: 3.2.2.r322_v20070119-RQghndJN8IM0MsK
    Build id: M20070212-1330

    Eclipse RCP

    Version: 3.2.2.r322_v20070104-8pcviKVqd8J7C1U
    Build id: M20070212-1330

    Eclipse Java Development Tools

    Version: 3.2.2.r322_v20070104-R4CR0Znkvtfjv9-
    Build id: M20070212-1330

    Eclipse Plug-in Development Environment

    Version: 3.2.1.r321_v20060823-6vYLLdQ3Nk8DrFG
    Build id: M20070212-1330

    Eclipse Project SDK

    Version: 3.2.2.r322_v20070104-dCGKm0Ln38lm-8s
    Build id: M20070212-1330

    Eclipse Graphical Editing Framework

    Version: 3.2.2.v20070208
    Build id: 20070208-1315

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -launcher
    C:\java\ide\MyEclipse\eclipse\eclipse.exe
    -name
    Eclipse
    -showsplash
    600
    -exitdata
    ac4_88
    -vm
    C:\java\ide\MyEclipse\jre\bin\javaw.exe

    #271876 Reply

    Riyad Kalla
    Member

    MediaVu,
    I couldn’t reproduce this locally. Can you try creating a new project, then a new test form in that project and see if you cannot change the layout there for a panel either?

    If it’s still not working, can you try and use FIle > Switch Workspace > C:\tempworkspace, and hit OK to restart. Then create a new test project with a single test form in it and try again… did that work?

    #271906 Reply

    Mike Groys
    Member

    Riyad,

    Creating a new blank project worked. The other project though is not working. I’d rather not recreate that project… Any idea what could cause the problem?

    Thanks,
    Greg.

    #271921 Reply

    Riyad Kalla
    Member

    A new project in the same workspace did the trick? Hmm… you could try restarting using -clean as outlined here:
    https://www.genuitec.com/forums/topic/troubleshoot-using-the-clean-command-line-argument/

    if that doesn’t work, try and create a new Matisse form in the same broken project, and try and change it’s layout… does *that* work? Then atleast we’ve pinpointed the problem specifically to the form itself.

    #271933 Reply

    Mike Groys
    Member

    @support-rkalla wrote:

    A new project in the same workspace did the trick? Hmm… you could try restarting using -clean as outlined here:
    https://www.genuitec.com/forums/topic/troubleshoot-using-the-clean-command-line-argument/

    I tried a fresh workspace. A new project works, but if I import the existing project, the problem still occurs.
    @support-rkalla wrote:

    if that doesn’t work, try and create a new Matisse form in the same broken project, and try and change it’s layout… does *that* work? Then atleast we’ve pinpointed the problem specifically to the form itself.

    Nope, the form is ok. It was a dummy form anyway.

    I think I figured it out… The project had a build output path set to a linked folder. After I set it to a standard [Project]/bin folder, I was able to change the layout. Go figure…

    Thanks for your help,
    Greg

    #271937 Reply

    Riyad Kalla
    Member

    Doh that’s definately a corner-case bug… I’ll make a note of it, thanks for the heads up.

    #281299 Reply

    ksdyer
    Member

    Has any action been taken on this issue? Building to a linked resource (C drive) is 100 times faster for us than building to the vob (its not local).

    #281301 Reply

    Riyad Kalla
    Member

    ksdyer,
    Nothing has changed regarding this issue, management hadn’t prioritized it over the other work that went into subsequent releases.

    Are your workspaces on a network share or something such that a build into a project dir is sufficiently slower? MyEclipse uses the same incremental compiler that Eclipse JDT ships, so hopefully your builds are only diffs and not the entire project most of the time.

    #281307 Reply

    ksdyer
    Member

    Thanks Riyad. Yes our project is stored in our clearcase vob which is not local to where we work. The project is located in the vob so it can be shared by our whole group. That keeps everyone in the group updated on classpath changes.

    It is true that most builds do not recompile the whole source. But building to the vob puts a lot of uneccesary view private data in the vob not to mention the increased network traffic. Corporate’s direction to us is to not build into our vobs for these reasons.

    Is there anything I can do to change the priority of this issue?

    #281308 Reply

    Riyad Kalla
    Member

    ksdyer,
    Thank you for sharing a bit more details about your build environment. I will forward along to management and see if we could get this addressed.

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Unable to apply layout to any form

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