NetBeans: use a radio button group

It’s possible to unite several radio buttons into the group. For example, if the buttons “On” and “Off” are in the same button group, only one of them will be active (which is logical).

To create the radio button group in NetBeans do the following:

    1. Use “Button group” from the components palette and put it into Your form. It will be added as “non-visual”

Button group component

    1. Add the radio buttons to the group, changing their ButtonGroup property (combobox in the Properties)

RadioButton properties

To remove the radio button group, go to the inspector window and remove radio button group there.

  • Remove radio button group

PDF file: set the bookmark

Strange enough, Adobe Acrobar Reader does not allow to put the user-defined bookmarks into the PDF file (and this is so simple and necessary thing!)

However, with the help of some “hack” the bookmarks still could be used.

Here is the trick:

  1. Go to PDF Hacks site and download the zip file with the javascript.
  2. Extract the file bookmark_page.js from the archive
  3. Copy the file bookmark_page.js to one of the following folders:
    • %ProgramFiles%\Adobe\Reader\Javascripts
    • %AppData%\Adobe\Reader\Javascripts

    Please, check the real installation path of the Acrobat software, it could be different on Your system.

  4. Restart the Acrobat Reader

Now You have 4 new menu items in the menu “View”. The first two could be called using shortcut “Alt-V-5” and “Alt-V-6” (for English version of Acrobat)
Bookmarks in PDF

The bookmarks are not saved in the PDF itself, so they could be lost, if the PDF file is moved to some other location.

To uninstall the bookmark script, just remove bookmark_page.js from the Javascripts folder and restart the Acrobat Reader.

Some other PDF tricks could be found in this book:
[amazon-product]0596006551[/amazon-product]