...
- You can use
org.openide.util.WeakListeners
in order to create event listeners that will be removed is the source isn't being used anymore. This minimses the chance of memory leaks (see book NB for Beginners) in case you cannot remove the registered listener. Typical use case: registerLookupListener
in the constructor of aContextAware
action. If you experience that the EDT is blocked shortly after you haven opened the first dialog, or at least shortly after application startup, then you should add
-Dsun.awt.nopixfmt=true
as VM option to the run configuration.
The blocking is caused by a known bug in the JDK. Related Bug entries are:- If you have a high resolution display and the icons and text is wrongly scaled in the IDE than you need to change the netbeans.conf file.
Change the VM option-Dsun.java2d.dpiaware
from true to false.
We have the same problem in SNAP when we run the launcher but for some reason setting this option has no effect. If SNAP is launched by maven using nbm:run-platform the property works and every thing is scaled correctly.
Preferences
Don't use PropertyMap
anymore, always use java.util.Preferences
instead (SnapApp.getPreferences()
), for compatibility during migration use org.esa.snap.gui.compat.CompatiblePropertyMap
.
...