Oracle Data Modeler: unable to create Java instance

The following error was displayed during the start of Oracle SQL Developer Data Modeler (v3.3.0.734) on Windows:

Unable to create an instance of the Java Virtual Machine
Located at path: ..\..\jdk\jre\bin\client\jvm.dll

This could be fixed by editing the file datamodeler\bin\datamodeler.conf :
try to change the following line
AddVMOption -Xmx768M
to
AddVMOption -Xmx512M

and restart Data Modeler after this.

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

Install javadoc for NetBeans

Java documentation is not included neither in NetBeans installation, nor in “standard” Java SDK installation.

However, it’s possible to download it manually and add to the NetBeans IDE.

  1. Get the Java Documentation (currently “Java SE 6 Documentation”) from Sun site.
  2. Start NetBeans
  3. Select menu item “Tools->Java platforms”, then click “Javadoc” tab
  4. Click “Add Zip/Folder” button and select the path to the downloaded Zip-file

NetBeans Javadoc window

Java: minimize Application window

The following method could be used to minimize application window, if java.awt.Frame or its subclass is used:

public void setState(int state)
Parameters:
state – Frame.ICONIFIED if this frame is in iconic state;
Frame.NORMAL if this frame is in normal state.

Example:

// Close window on ESC
// use it in the constructor of the window, extending JFrame
//
KeyStroke stroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
rootPane.registerKeyboardAction(new ActionListener() {
public void actionPerformed(ActionEvent e) {
setState(Frame.ICONIFIED);
}
} , stroke, JComponent.WHEN_IN_FOCUSED_WINDOW);