import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class KnvsDanBo extends Canvas {
@Override
public void paint(Graphics rs){
rs.setColor(Color.blue);
rs.drawLine(80, 20, 80, 70);
rs.drawLine(130, 20, 130, 70);
rs.drawLine(80, 20, 130, 20);
rs.drawLine(80, 70, 130, 70);
rs.drawLine(60, 80, 150, 80);
rs.drawLine(60, 180, 150, 180);
rs.drawLine(60, 80, 60, 180);
rs.drawLine(150, 80, 150, 180);
rs.drawLine(70, 190, 70, 250);
rs.drawLine(90, 190, 90, 250);
rs.drawLine(120, 190, 120, 250);
rs.drawLine(140, 190, 140, 250);
rs.drawLine(70, 190, 90, 190);
rs.drawLine(70, 250, 90, 250);
rs.drawLine(120, 190, 140, 190);
rs.drawLine(120, 250, 140, 250);
rs.drawLine(30, 90, 50, 90);
rs.drawLine(30, 140, 50, 140);
rs.drawLine(30, 90, 30, 140);
rs.drawLine(50, 90, 50, 140);
rs.drawLine(160, 90, 180, 90);
rs.drawLine(160, 140, 180, 140);
rs.drawLine(160, 90, 160, 140);
rs.drawLine(180, 90, 180, 140);
rs.drawLine(90, 30, 100, 30);
rs.drawLine(90, 40, 100, 40);
rs.drawLine(90, 30, 90, 40);
rs.drawLine(100, 30, 100, 40);
rs.drawLine(110, 30, 120, 30);
rs.drawLine(110, 40, 120, 40);
rs.drawLine(110, 30, 110, 40);
rs.drawLine(120, 30, 120, 40);
rs.drawLine(100, 50, 110, 50);
}
}
class Gambar extends JFrame{
KnvsDanBo gambar=new KnvsDanBo();
Gambar(){
super("REFSA");
setLocation(100,100);
setSize(230,300);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
komponenVisual();
}
void komponenVisual(){
getContentPane().setLayout(new GridLayout());
getContentPane().add(gambar,"Center");
setVisible(true);
}
public static void main(String[]args){
Gambar ch=new Gambar();
}
}