/ Published in: Java
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
<html>
<head>
</head>
<body>
<applet code="Example01.class" width="300" height="300">Non sono supportata...</applet>
</body>
</html>
import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
import javax.swing.JApplet;
{
public void init()
{
this.addMouseMotionListener(this);
}
public void start()
{
this.repaint(); // Ridisegna lo schermo
}
{
super.paint(g);
}
{
}
{
g.drawLine(e.getX(), e.getY(), e.getX(), e.getY());
}
}
Comments
 Subscribe to comments
                    Subscribe to comments
                
                