How to make file Write Protected
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
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) {
} }