Wednesday, September 15, 2010

Changing Help Brower font-size in NetBeans IDE

Help Browser font is not configurable in NetBeans.  After detailed discussion it was set to such a value which will be usable for all operating systems.

So there is no normal way to change the font for the Help Browser. There is a hack around this, knowing the fact that the Help browser uses HTML and CSS files. You can change the CSS definition of the body and p elements in the CSS file which is used for the Help Browser. The downside is you have to edit this file any time you want the font size to be changed.

The image above is what you will see if you open the Help Browser on a Mac.

If for some reason you want the font size bigger then the way to change font size is to open the ide.css file located in the paths below and change the "font-size: medium" definition to "font-size: large" for body and p element definitions.  In fact you can use any value acceptable for fond size in CSS files.

Path for the usersguide CSS file on different platforms:

On Mac

On Ubuntu

On Windows 7
C:\Program Files\NetBeans 6.9.1\ide\docs\org\netbeans\modules\usersguide\ide.css

After changing the font-size to large:

You can see the Help Browser font is now bigger.

One better way of doing customizations in the ide.css file could be adding a customization section at the end of the file as follows:

/* Help Font Customization section */
body, p { font-size: large; }
/* end customization */

with regards
Tushar Joshi, Nagpur

Monday, September 13, 2010

Book Review: NetBeans Platform 6.9 Developer's Guide by Jurgen Petri

This book NetBeans Platform 6.9 Developer's Guide offers to help you in your transition from a Java Developer to become a NetBeans Platform Developer. The approach used in this book is an approach by example. Teaching through an example is a powerful pedagogical pattern which works. This book has assumed a requirement for creating a software with certain features and gradually progresses to develop this assumed software through many chapters. Through different chapters this book tries to teach a developer new concepts which are used in NetBeans Platform like Lookup, Window Systems, Nodes, File System and layer mechanism to name a few. I liked this approach of teaching through an example software requirement.

Developers are most comfortable when someone explains them through code examples. When a book offers learning by example it is always a pleasure. My first reaction was to search for any code sample if provided by the publishing company. I downloaded the code sample from Packt Publishing book page. When developers try to learn a new concept and write code according to instructions the sample code provide a check point to compare whether they have done it write.

The code sample provides significant data to compare but it would be more helpful with some additional things mentioned below:

  1. As of today the code sample does not compile on NetBeans IDE 6.9 out of the box, as it needs some changes in the settings
  2. The presentation locale for the code sample is in German and hence less intuitive to an English reader
  3. The changes in the settings like Lookup module, deprecated Swing extension module can be done by developers who already know some NetBeans platform concepts but for a total beginner they may render the code sample useless.
  4. The code sample is the final version of the software which gets developed progressively through the chapters so it does not help much in the initial chapters, if the code sample is available in chapter wise format it will be a great aid for the book.

The instructions given in the book if followed word by word and line by line, then they do not work in some places. This was a frustrating thing for me. I could figure out the changes needed as I am well ahead in the NetBeans Platform learning curve and have read 2 more books on NetBeans Platform and have watched the top 10 API videos by Geertjan.

For a total beginner the instructions given in the book MUST work when followed exactly word by word and line by line, to give a smooth experience and to avoid frustration.  For me this doesn't happened with this book.  Blindly following the instructions in the book do not lead to smooth running application and need some refactoring of access (like making certain packages public), one misplaced illustration as mentioned in the the errata on NetBeans wiki and other corrections also mentioned on the errata page.

I came to know about the ERRATA for this book at Packt Publishing site and also one ERRATA maintained by community at the NetBeans Wiki here. This Errata is a MUST to follow to make the instructions in the book work for you. So using this book plus the errata on the NetBeans wiki makes the book complete in all the instructions. With this correction this book will help a Java developer kick start as a NetBeans Developer.

In summary the plus points of the book are:
  1. Teaching by example pedagogical approach
  2. Way of teaching and the language is easy to understand.
  3. Lots of illustrations
  4. Step by step instructions which can be followed to recreate what has been taught (Requires help from errata published on NetBeans wiki)
  5. Experience of creating a complete software using NetBeans Platform towards the end of the book

and the minus points, which I believe will be corrected gradually by Packt publishing by publishing complete errata on their site and fixing the text in next edition
  1. Code sample not chapter wise
  2. Code sample not in English locale
  3. Many corrections required in book to make it work in code as expected by the author. This point is disappointing for a total new developer as they may have no clue about how to correct these errors, and the errata maintained by community is a must reference in that case.

In conclusion Packt Publishing has added one more interesting book in the range of NetBeans Platform learning books. This book gives the feel of NetBeans Platform development quickly and provides opportunity for developers to kick start their journey in the NetBeans Platform land.

With regards
Tushar Joshi, Nagpur


Netbeans IDE is powered by NetBeans Platform


NetBeans IDE is built upon a software system called as NetBeans Platform. NetBeans Platform is used in software development since year 2000 when it went open source. NetBeans Platform is a framework which enables rapid desktop application development. It is an evolving platform and can do much more than rapid application development.

When we start developing a Java application, to achieve some business requirement; we often encounter a set of similar minimum requirements for a software.

The requirements like:

  • Software shall be modular, which will enable us to turn modules on or off.
  • Software shall be extensible, which will make it easy to add more functionality and extend the existing functionality.
  • Software shall have a consistent User Interface and shall follow industry standards for graphical user interface.
  • Software shall provide multithreaded approach for parallel tasks.
  • Software shall contain configurable settings for many features offered in it
  • Software shall have dockable windows
  • Software shall be cross platform
  • Software shall have cross platform deployment mechanism in such a way that native operating system users are comfortable with it
  • Software shall have a update mechanism, which will enable the user to update the modules online
  • Software shall have module versioning feature which enable developers to create modules for the software which depend on certain version of earlier modules
NetBeans Platform provides solutions for all the requirements mentioned above in a time tested way. It is prudent to use such a platform to develop softwares having more than one of the requirements listed above to save time in architectural features which are necessary for the stability and usability of the software.

This out of the box feature availability is the reason why the people listed in the NetBeans Showcase have chosen NetBeans Platform to build their software applications. I got acquainted with the NetBeans Platform when I started writing this blog and I was fascinated with the platform. Obviously my next step was to start learning this framework and I started searching for documentation and books.

Many things are helping me learning the NetBeans Platform like:
What I found out from my learning is that there is a learning curve associated with NetBeans Platform as it was developed through many years and contains tons of patterns and practices. But, once you acquire the skill of using NetBeans Platform it is a pleasurable experience and efficient way of developing Java applications.

To make the learning easy for new developers Packt Publishing has published a new book for NetBeans Platform named NetBeans Platform 6.9 Developer's Guide by J├╝rgen Petri.  Initially this was a book in German language which is translated by the NetBeans Community in english to make it available for wider audience in the world.

I was asked by Packt Publishing to review this book because of my association with NetBeans IDE and because of this blog where I write about NetBeans IDE. It was a pleasure receiving a complimentary PDF copy of the book and going through all the concepts presented by the book.

With regards
Tushar Joshi, Nagpur