API/Samples/Java/Office/OptionsPageDemo
From Apache OpenOffice Wiki
The OptionsPageDemo sample extensions shows how to integrate a custom options page within the existing tree of options pages (here: below Writer) and shows how to store and load the settings in and from the OpenOffice.org registry.
The extension uses a custom registry schema to store configuration values. Additionally the extension shows how to add a custom help for an extension.