X

Geertjan's Blog

  • August 20, 2011

NetBeans IDE 7.1 Window Layout Designer

Geertjan Wielenga
Product Manager

In 7.1, you'll see this in the New File dialog:

I.e., as you can see, there'll be two new file templates. One for creating & registering a new layer file (hurray!), which you'll not be able to create when you create a new module. That's good, because you'll only have a layer file when you actually need it.

Secondly, you'll see the "Layout of Windows" wizard, which will be very useful when you're creating your own modes. When you step through the wizard, this dialog will appear, where you're able to create new modes:

For example, as you can see below, I have added two new modes ("banner1" and "banner2") and positioned them (using drag and drop) within the frame of the application:

When I close the window that you see above, the wizard recognizes that there are two new modes, as you can see below:

Then, when you click Next above, you can see that two new mode files will be created, and that the layer file will be changed, i.e., those two new mode files will be registered in the layer file when the wizard completes:

And, here you can see what is found in my module when the wizard completes:

Therefore, when I create new windows, I can now choose the new modes I designed above:

That should take some of the pain away when designing the layout of your applications on the NetBeans Platform.


Join the discussion

Comments ( 12 )
  • SorinS Monday, August 22, 2011

    Hi,

    This is great news! We were looking for this feature for quite some time.

    Many thanks to the netbeans team for implementing it.

    Thanks,

    Sorin


  • RobT Monday, August 22, 2011

    Great news Geertjan, I wasn't expecting this to be available so soon!

    Regards,

    -Rob


  • guest Thursday, August 25, 2011

    can we use this to create perspectives : predefined as we as user defined?


  • José Gregorio Saturday, November 8, 2014

    Hi Geertjan,

    I'm reading the book "JavaFX Rich Client Programming on the Netbeans Platform" by Gail Anderson and Paul Anderson where I discovered this Netbeans's feature in the chapter 8. But It´s not working for me, after made each step that they show (similar to this procedure), nothing happen. I got a message in the wizard that say "No layout definition found", and that´s it. I have to cancel the wizard. So I can not made the exercise.

    I´m using Netbeans 8.0.1 (Build 201408251540), running on windows 7 professional Service Pack 1 on an i3 cpu 560 @ 3.33GHz with 4 GB RAM.

    ¿Could you tell me what is wrong?

    Best Regards,

    José Gregorio Castillo


  • Christian Thursday, September 24, 2015

    Hi Geertjan,

    Thanks for blogging about Netbeans. It's been very useful for me while learning the platform.

    I'm having the same problem that Jose has. Googling about "No layout definition found" gives only 2 pages, which is kind of shocking.

    I noticed that modes are regenerated after each clean/build sequence here:

    \build\testuserdir\config\Windows2Local\Modes

    I suspect that the error is related to a path problem, it would be nice to know what is the wizard looking for.

    Thanks and Regards,

    Chris


  • Geertjan Friday, September 25, 2015

    World hunger is shocking. The refugee crisis is shocking. Not finding something on Google is annoying, but shocking is surely the wrong word. Join the mailing list (dev@platform.netbeans.org) and ask your questions there -- if I know the answer, I'll try to help. You're going to have to describe in a lot more detail what someone needs to do to reproduce the problem.


  • guest Tuesday, May 31, 2016

    Question: Is these newly created modes global to the entire application, or can they only be used in the module where they are created? I'd love to have several of my TopComponents that are spread between multiple modules use the same new mode without having to create the new one everywhere.


  • Geertjan Tuesday, May 31, 2016

    That's precisely the point of modes. Write them once, use them everywhere.


  • guest Tuesday, May 31, 2016

    I have entered a response to a topic in the mailing list about the inability to use the Layout of Window wizard due to the "No Layouts Found" issue. I've tried a number of different solutions, including leaving out certain modules, etc., and the problem remains.


  • Geertjan Tuesday, May 31, 2016

    Without steps to reproduce, can't help. Make sure you're using the latest release of NetBeans IDE and the NetBeans Platform, which is 8.1. Also, get the book: https://leanpub.com/nbp4beginners


  • guest Tuesday, May 31, 2016

    Not sure what I can add in the way of steps to reproduce. My project consists of 14 modules, and 3 library wrapper modules. One of the modules is an InstallModule which builds and executes a login screen. The initialization process consists of starting several web services, and a JMS service.

    My desire is to create a mode which will always be a floating window. It will be used by a couple of TopComponents within the application. I select one of the modules which uses one of these top components, and select New->Other->Module Development->Layout of Windows. I read the warning about recompiling and running the application and I have checked the Ignore previous runs option. The application proceeds through the typical startup, including prompting for login information, starting the background web service processes and JMS process, and then presents the basic NB platform widow modes. I click the new mode icon in the top left corner and it produces a new editor tab. I select that tab, float the window, and rename the mode to "floating". I then close the application by clicking the 'x' in the main window. The wizard then displays the "No Layout definitions found" message and only allows me to go back or cancel. No further information or errors are found in the log or elsewhere.


  • guest Friday, June 3, 2016

    Not sure what I can add in the way of steps to reproduce. My project consists of 14 modules, and 3 library wrapper modules. One of the modules is an InstallModule which builds and executes a login screen. The initialization process consists of starting several web services, and a JMS service.

    My desire is to create a mode which will always be a floating window. It will be used by a couple of TopComponents within the application. I select one of the modules which uses one of these top components, and select New->Other->Module Development->Layout of Windows. I read the warning about recompiling and running the application and I have checked the Ignore previous runs option. The application proceeds through the typical startup, including prompting for login information, starting the background web service processes and JMS process, and then presents the basic NB platform widow modes. I click the new mode icon in the top left corner and it produces a new editor tab. I select that tab, float the window, and rename the mode to "floating". I then close the application by clicking the 'x' in the main window. The wizard then displays the "No Layout definitions found" message and only allows me to go back or cancel. No further information or errors are found in the log or elsewhere.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha