Final answer:
The correct command to draw a diagonal line from the top-left corner to the bottom-right corner in an 800 by 600 applet window using the Graphics class is g.drawLine(0,0,799,599).
Step-by-step explanation:
The correct command to draw a diagonal line from the top-left corner to the bottom-right corner in an 800 by 600 applet window using the Graphics class is option e: g.drawLine(0,0,799,599).
Drawing diagonal lines in Java applets involves using the Graphics class, which provides methods for drawing shapes and lines.