# java

fcostes (fcostes@planetepc.fr)
Thu, 12 Jun 1997 16:38:01 +0200

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Jesus Maria Rodriguez Presedo: "JCE-1.1"
- Previous message: David Boydston: "Has Navigator been tested?"

    Date: Thu, 12 Jun 1997 16:38:01 +0200

    From: fcostes <fcostes@planetepc.fr>

    To: java-security@web2.javasoft.com

    Subject: java

Ce message est en plusieurs parties sous format MIME.

--------------32951C824D42
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Dear Sir/Madam,
I am a beginner in writing java applets. I have tried to write it one
but there is mistakes which I cannot find out. Can you help me. I leave
you a copy of my applet.

I loook forward to receiving an answer.

Yours faithfully

Francois COSTES

--------------32951C824D42
Content-Type: text/plain; charset=us-ascii; name="layout.java"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="layout.java"

import java.awt.*;
import java.applet.*;

public class layout extends Applet{

public void init(){

setLayout(new BorderLayout());

Label cL = new Label ("Center");
Label nL = new Label ("North");
Label wL = new Label ("West");
Label eL = new Label (East);

Panel cp = new Panel(cL);
Panel np = new Panel(nL);
Panel sp = new Panel();
Panel wp = new Panel(wL);
Panel ep = new Panel(eL);

Button sB = new Button("South");
sp.add(sB);
cp.setBackground(Color.cyan);
np.setBackground(Color.cyan);
sp.setBackground(Color.cyan);
wp.setBackground(Color.cyan);
ep.setBackground(Color.cyan);
String nonews = "No News";
cp.add(nonews);

}

public boolean action (Event evt, Object what){

String southstring = new String("South");

if(southstring.equals(what)){
cp.setBackground(Color.blue);
cp.blankNameTag();
cp.repaint();
return true;
}
return false;

}

public boolean keyDown(Event evt, int key){

target = (char)key;
return true;
cp.add(key);

}

public boolean mouseEnter(Event evt, int x, int y){

Graphics g = this.getGraphics();
g.setColor(Color.blue);
return true;

}

public boolean mouseExit(Event evt, int x, int y){

setBackground(Color.cyan);
repaint();
return true;

}

}

--------------32951C824D42--

- Next message: Jesus Maria Rodriguez Presedo: "JCE-1.1"
- Previous message: David Boydston: "Has Navigator been tested?"