import javax.swing.*;
import java.awt.Graphics;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;

public class cizgiP extends JPanel
{
 
 public void paintComponent(Graphics g)
 {
 super.paintComponent(g);
 Graphics2D g2=(Graphics2D)g;	 
 g2.setFont(new Font("Serif",Font.BOLD,24));	 
 g2.setColor(Color.red);
 g2.setStroke(new BasicStroke(5.0f));
 Line2D x=new Line2D.Double(50,50,800,800);
 g2.draw(x);	 
 }

}

