@Action
    public void Delete() {int c =0;
JPasswordField pf = new JPasswordField();
JOptionPane.showConfirmDialog(null, pf, "Enter Password(max 6 char)", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
String pass = new String(pf.getPassword());
try
		{
                    BufferedReader br = new BufferedReader(new FileReader("C:/securednotes/config.config"));
			String sCurrentLine;

			while ((sCurrentLine = br.readLine()) != null) {
                             BigInteger bigInt = new BigInteger(sCurrentLine);
                                String textBack = new String(bigInt.toByteArray());
                            if(textBack.equals(pass)){ c = 1;jTextArea1.setText("");jTextArea2.setText("");}
                        else{
                        JOptionPane.showMessageDialog(null, "Wrong Password", "Secure Note", JOptionPane.INFORMATION_MESSAGE);
                        System.exit(0);
                        }

			}

		} catch (IOException e) {
		}
if(c==1){jFileChooser2 = new JFileChooser("C://securednotes/");
jFileChooser2.setFileSelectionMode(JFileChooser.FILES_ONLY);
 FileNameExtensionFilter xmlfilter = new FileNameExtensionFilter(".txt files (*.txt)", "txt");
           jFileChooser2.setFileFilter(xmlfilter);

         jFileChooser2.setFileFilter(xmlfilter);
int returnVal = jFileChooser2.showOpenDialog(this.getFrame());

if (returnVal == JFileChooser.APPROVE_OPTION) {
        File file = jFileChooser2.getSelectedFile();
        // ... code that loads the contents of the file in the text area

 try{



    		if(file.delete()){
    JOptionPane.showMessageDialog(null,file.getName().replace(".txt", "") + " is deleted!" , "Secure Note", JOptionPane.INFORMATION_MESSAGE);

                    //                    System.out.println(file.getName() + " is deleted!");
    		}else{
    			  JOptionPane.showMessageDialog(null,"Operation Failed", "Secure Note", JOptionPane.INFORMATION_MESSAGE);
    		}

    	}catch(Exception e){

        }

}

        
    }}