Roger Dickey

Greenhorn
+ Follow
since Jun 12, 1999
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Roger Dickey

import java.awt.Graphics;
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
public class IsReq extends Applet implements ActionListener {
private TextField text1, text2, text3;
private Button submit, clear;
private Label label1, label2, label3, label4;
private CheckboxGroup group;
private Checkbox check1, check2;
private DataOutputStream output;
public void init()
{
label1 = new Label( "Your name: " );
add( label1 );

text1 = new TextField( 25 );
add( text1 );
label2 = new Label( "Department:" );
add( label2 );

text2 = new TextField( 25 );
add( text2 );
label3 = new Label( "Date Required:" );
add( label3 );
text3 = new TextField( 8 );
add( text3 );
group = new CheckboxGroup();
label4 = new Label( "Problem Type:" );
add( label4 );
check1 = new Checkbox( "Software", group, false );
add( check1 );
check2 = new Checkbox( "Hardware", group, false );
add( check2 );
submit = new Button( "Submit" );
submit.addActionListener( this );
add( submit );
clear = new Button( "Clear" );
clear.addActionListener( this );
add( clear );
}


public void actionPerformed( ActionEvent e )
{
if ( e.getSource() == submit )
{
showStatus( "Submitting information..." );
try
{
output = new DataOutputStream(
new FileOutputStream( "temp.dat" ) );
output.writeUTF( "Name: " + text1.getText() );
output.close();
showStatus( "Information submitted!" );
}
catch( IOException a )
{
showStatus( a.toString() );
}
}
if ( e.getSource() == clear )
{
text1.setText( "" );
text2.setText( "" );
text3.setText( "" );
check1.setState( false );
check2.setState( false );
}
}
}


Let me know if you need anything else.
21 years ago
I am creating a simple applet to enter info in and write it to a file, on a linux machine. I can compile the applet fine and when I run it and try to write to the file I get a:
access denied (java.io.FilePermission temp.dat write)
but the directory where I am trying to write has full write permissions set and I tried doing it as root and I still get this message. If anyone has any thoughts, I would really like to hear them!
21 years ago