alguem se propoem a me ajudar a melhorar esse código?
import javax.swing.*;
import java.awt.*;
import java.awt.Graphics;
public class PasseioDoCavalo extends JApplet {
public void paint(Graphics g){
super.paint( g );
Dimension d = getSize();
g.setColor(Color.black);
System.out.println("dimensão da tela: " + d.width + " x " + d.height + " = " + d.width*d.height);
for(int i = 0; i < 8; i++){
//g.drawLine(0, (d.height / 8)*i, d.width, (d.width / 8)*i);
//g.drawLine((d.height / 8)*i, 0, (d.width / 8)*i, d.height);
if(i % 2 == 0){
System.out.println();
g.fillRect((d.width / 8), (d.width / 8) * i, d.width / 8, d.width / 8);
g.fillRect((d.width / 8) * 3, (d.width / 8) * i, d.width / 8, d.width / 8);
g.fillRect((d.width / 8) * 5, (d.width / 8) * i, d.width / 8, d.width / 8);
g.fillRect((d.width / 8) * 7, (d.width / 8) * i, d.width / 8, d.width / 8);
g.fillRect((d.width / 8) * i, (d.width / 8), d.width / 8, d.width / 8);
g.fillRect((d.width / 8) * i, (d.width / 8)*1, d.width / 8, d.width / 8);
g.fillRect((d.width / 8) * i, (d.width / 8)*3, d.width / 8, d.width / 8);
g.fillRect((d.width / 8) * i, (d.width / 8)*5, d.width / 8, d.width / 8);
g.fillRect((d.width / 8) * i, (d.width / 8)*7, d.width / 8, d.width / 8);
}
}
}
}
html ----->
<HTML>
<APPLET CODE=PasseioDoCavalo.class width=600 height=600></APPLET>
</HTML>