public void saveSettings() {
        try {
            settings.setDisplay(monitorSelected);
            OutputStream out = new FileOutputStream("TestMonitorApp.prefs");
            settings.save(out);

            int monitorSelected = settings.getDisplay();
            String label =
                "Selected Monitor " +
                monitorSelected +
                " " +
                monitors.get(monitorSelected).getName() +
                " Res: " +
                monitors.get(monitorSelected).getWidth() +
                "," +
                monitors.get(monitorSelected).getHeight() +
                "refresh: " +
                monitors.get(monitorSelected).getRate();
            selectedMonitorTxt.setText(label);
            if (!settings.isFullscreen()) fullScreenTxt.setText(
                "(f) Window Screen"
            ); else fullScreenTxt.setText("(f) Fullscreen");
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
This function saves out the AppSettings into a file to be loaded back in
on start of application.
jme3-examples/src/main/java/jme3test/app/TestMonitorApp.java