}
public void showPreferencesView() {
try {
if (preferences == null) {
preferences = new PreferencesFrame(getDevicePreferences(), getUiPreferences());
} else {
preferences.setPreferences(getDevicePreferences(), getUiPreferences());
}
if (!preferences.isVisible()) {
preferences.setLocationRelativeTo(this);