fork download
  1. import java.awt.*;
  2. import java.applet.*;
  3. /** Lab 05
  4.  * 80
  5.  * Author(I love you smola bean!! <3)
  6.  */
  7. public class Lab05v80 extends Applet
  8. {
  9. public void paint(Graphics g)
  10. {
  11. int width = 980;
  12. int height = 630;
  13.  
  14. int brx1 =990, bry1=10;//Starting coordinates for bottom right corner
  15. int brx2 =990, bry2=640;//Ending coordinates for bottom right corner
  16.  
  17. int blx1 =10, bly1 =10;//Starting coordinates for bottom left corner
  18. int blx2 =10, bly2=640;//Ending coordinates for bottom left corner
  19.  
  20. int trx1 =990, try1=640;//Starting coordinates for top right corner
  21. int trx2 =990, try2=10;//Ending coordinates for top right corner
  22.  
  23. int tlx1 =10, tly1 =640;//Starting coordinates for top left corner
  24. int tlx2 =10, tly2 =10;// Ending coordinates for top left corner
  25.  
  26. g.drawRect(10,10,width,height);
  27.  
  28. // Draw bottom-left corner
  29. while (bly1 <height )
  30. {
  31. g.drawLine(blx1,bly1,blx2,bly2);
  32. bly1+=15;
  33. blx2+=23;
  34. }
  35. // Draw bottom-right corner
  36. while (bry1 <height )
  37. {
  38. g.drawLine(brx1,bry1,brx2,bry2);
  39. bry1+=15;
  40. brx2-=23;
  41. }
  42. // Draw top-right corner
  43. while (try1 >try2 )
  44. {
  45. g.drawLine(trx1,try1,trx2,try2);
  46. trx2-=23;
  47. try1-=15;
  48. }
  49. // Draw top-left corner
  50. while (tly1 >tly2 ){
  51. g.drawLine(tlx1,tly1,tlx2,tly2);
  52. tlx2+=23;
  53. tly1-=15;
  54. }
  55. }
  56. }
  57.  
  58.  
  59.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:7: error: class Lab05v80 is public, should be declared in a file named Lab05v80.java
public class Lab05v80 extends Applet
       ^
1 error
stdout
Standard output is empty