X

Geertjan's Blog

  • September 5, 2006

NetBeans Project Samples and Visual Library 2.0 (Part 2)

Geertjan Wielenga
Product Manager
I've uploaded an NBM file containing all the Visual Library 2.0 samples into my update center (link to it in the left sidebar and, if you need them, instructions for using it are elsewhere in this blog). When you get to my update center, you will find two modules. One is called "55beta2modulesamples". The other is called "NetBeansVisualLibrarySamples". The latter is the one you want in this case.

Without following the Setup Building Environment, you will NOT be able to compile or run the samples. The samples all depend on these two JARs: org-netbeans-api-visual and org-openide-util.jar. For the normal Java applications, attach these two (once you've checked out the Graph library sources and built the JAR files as instructed in the Setup document) using the project's Libraries node. For the NetBeans module projects, one approach is to create a module suite, attach a library wrapper module project that contains the two JAR files, attach the NetBeans module project sample, and add a dependency in the NetBeans module project sample on the library wrapper module project. (Another, better, approach is to get the Graph library sources into a download of the NetBeans sources and to then use the NetBeans sources as your NetBeans Platform. Then no separate module suite will need to be created.)

In total, there are 33 samples. 28 of them are standard Java projects. The following are the five NetBeans module projects:

  • Active Tool Sample
  • Color Animator
  • Control Point
  • Floating Menus Sample
  • Multi View Sample

I haven't worked out how to change the icon (which would make it simpler to identify which sample uses which project type), so whenever a sample is a NetBeans module project, there's a big bold text in the Description area, as you can see in the screenshot in yesterday's blog.

Once you've got everything set up, I suggest you just run the samples one by one, play with the result, and then—if you find one that interests you—look at the code (normally not much, since the samples are small) that makes it all happen. There's some cool bits of functionality and some impressively complex graphs in several of those samples.

Soon some form of the Simpsons sample (discussed in recent blog entries) will be in my update center too.

Postscript: Noticed some problems with the NetBeans module project samples, because they expect to be in a module suite. Will fix this. Meantime, you can still look at the sources to see how they're put together. Or just copy the files into a new NetBeans module project.

Join the discussion

Comments ( 2 )
  • guest Wednesday, September 13, 2006
    fg
  • wuxin Wednesday, August 27, 2008

    Hi Geertjan,

    I wonder is it possible to use Visual Library in JavaFX? Thanks!


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