How to make file Write Protected

In this lesson,i hope to teach you how to make file write protected using java.in 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
http://ity.im/0rN93

you can download youtube video from here
http://ity.im/0rN94
Code :private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
        try {
            File file=new File(jTextField1.getText());
            file.setReadOnly();
            if (file.canWrite()) {
                jLabel2.setText("This File Is Writeable");
            }
 else{
 jLabel2.setText("This File Is Read Onley");
 }        } catch (Exception e) {
        }    }                            
         
7/17/2012 05:38:28 am

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.

Reply

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%.

Reply
3/31/2013 08:58:23 pm

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!

Reply



Leave a Reply.