Showing posts with label cross platform. Show all posts
Showing posts with label cross platform. Show all posts

Monday, August 16, 2010

NetBeans Platform 6.9 Developer's Guide


Packt publishing has published a new book on the development of NetBeans Platform applications named NetBeans Platform 6.9 Developer's Guide.  The description of the book says that:

This book guides you through the development of a complete Swing application built on the NetBeans Platform. Each chapter introduces a number of new concepts relating to a theme, such as the window system, and then shows you how to implement the concepts in the application you are creating. At the end of the book you have a task manager, which you can adapt to your own purposes. Or you can, of course, create your own applications, now that you have built up a solid basis of NetBeans Platform knowledge.

I will be presenting a detailed review of this book, in my next post.

[UPDATE Sep 12, 2010] I started evaluating this book like a total beginner, and it is taking me some time to go through the sample code and to reproduce what is taught.  This is helping me understand what a new learner will feel after reading this book.  I will post my review soon.

with regards
Tushar Joshi, Nagpur

Saturday, May 3, 2008

NetBeans IDE - Look and Feel

The default look and feel of the recently released NetBeans IDE 6.1 final is set automatically according to the operating system. This make the NetBeans appear as a Windows application with Windows look and feel while running on windows and so forth in other operating systems.

(Default look and feel on windows XP)

I like the cross platform look of java applications which can be set by configuring the java applications with the Metal look and feel. NetBeans also allows us to change the default look and feel by a configuration setting.

Ideally I would have loved to have a look and feel menu or a setting in the preferences dialog in the NetBeans IDE GUI to set the look and feel. The current way to change the default look and feel is either by changing the configuration file or passing a command line argument to the netbeans startup command.

I will use the configuration file setting method to change the default look and feel of NetBeans IDE.

As this setting is a configuration setting I will have to pass the exact fully qualified name of the look and feel class I want.

In our case as we want metal look and feel we will use the name:

javax.swing.plaf.metal.MetalLookAndFeel

When default paths are chosen for the installation of NetBeans IDE it gets installed in


C:\Program Files\NetBeans 6.1


The configuration files are kept in a subdirectory named etc so the exact path for the netbeans.conf file is:


C:\Program Files\NetBeans 6.1\etc\netbeans.conf


When opened in text editor it will look like


Here we will change the netbeans_default_options portion and add one additional switch to the options line.

(netbeans.con snap without look and feel setting)

We will add the look and feel option like


--laf javax.swing.plaf.metal.MetalLookAndFeel


(netbeans.conf with the additional look and feel option)

Now when we start the NetBeans IDE again the look and feel will be seen as Metal.

(Cross platform Metal look and feel)

References:

NetBeans Wiki: FAQ Custome Look and Feel
Java Tutorials: How to set Look and Feel

with regards
Tushar Joshi, Nagpur