protected void onSaveKey()
    {
        File[] fileNames;
        FileDialog dlgSave = new FileDialog( this, "Save keystore...", FileDialog.SAVE );
        dlgSave.setFile( "*.ks" );
        
        try {
            this.readDataToKeyInfo();
            this.lblStatus.setText( "Choose file name..." );
            dlgSave.setVisible( true );
            fileNames = dlgSave.getFiles();

            if ( fileNames.length > 0 ) {
                File file = fileNames[ 0 ].getCanonicalFile();

                KeyManager kg = new KeyManager( file, this.keyInfo );
                this.lblStatus.setText( "Generating KeyStore..." );
                kg.generate();
                this.lblStatus.setText( "KeyStore file generated" );
                this.pnlData.setVisible( false );
            } else {
                this.lblStatus.setText( "Ready" );
            }
        } catch (RuntimeException
                | IOException
                | KeyStoreException
                | NoSuchAlgorithmException
                | CertificateException
                | InvalidKeyException
                | SignatureException
                | NoSuchProviderException ex)
        {
            this.lblStatus.setText( "Error: " + ex.getLocalizedMessage() );
        }
        finally {
            this.requestFocusInWindow();
        }
        
        return;
    }