|
What this is
Other links
The source code
package DataLoaderTests.DataObjectTest.data.Package;
/*
* SecurityJApplet.java
*
* Created on December 16, 1999, 10:39 AM
*/
import java.io.*;
/**
*
* @author pknakal
* @version
*/
public class SecurityJApplet extends javax.swing.JApplet {
/** Creates new form SecurityJApplet */
public SecurityJApplet() {
initComponents ();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the FormEditor.
*/
private void initComponents () {//GEN-BEGIN:initComponents
jButton1 = new javax.swing.JButton ();
jLabel1 = new javax.swing.JLabel ();
jButton1.setText ("Push me :-)");
jButton1.addMouseListener (new java.awt.event.MouseAdapter () {
public void mouseClicked (java.awt.event.MouseEvent evt) {
createFile (evt);
}
}
);
getContentPane ().add (jButton1, java.awt.BorderLayout.SOUTH);
jLabel1.setText ("Buttun create file in actual directory = \".\"");
getContentPane ().add (jLabel1, java.awt.BorderLayout.CENTER);
}//GEN-END:initComponents
private void createFile (java.awt.event.MouseEvent evt) {//GEN-FIRST:event_createFile
try {
FileOutputStream fstream = new FileOutputStream("Pokus");
DataOutputStream dstream = new DataOutputStream(fstream);
dstream.writeBytes("*********************************************\n");
dstream.flush();
dstream.close();
}
catch (IOException e) {
}
}//GEN-LAST:event_createFile
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
// End of variables declaration//GEN-END:variables
}
|
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.