How to make file Write Protected

In this lesson,i hope to teach you how to make file write protected using this lesson i use Java IO package.
first i get input using j text field and
pass it value to j button
you can download net beans project
from here

you can download youtube video from here
Code :private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
        try {
            File file=new File(jTextField1.getText());
            if (file.canWrite()) {
                jLabel2.setText("This File Is Writeable");
 jLabel2.setText("This File Is Read Onley");
 }        } catch (Exception e) {
        }    }                            


07/17/2012 12:38

Properly written articles like yours renews my faith in today�s writers. You�ve written info I can lastly agree on and use. Thank you for sharing.


marked "UV" "UV": This means that the lens on the UV cutoff wavelength of 380nm, than the maximum τmax (λ) the spectral transmittance at 380nm wavelength (λ) is not greater than 2%.

04/01/2013 03:58

I really appreciate this post. I have been looking everywhere for this! Thank goodness I found it on Bing. You have made my day! Thx again!


Leave a Reply