import java.awt.Color; import java.awt.Graphics; import javax.swing.JFrame; import javax.swing.JPanel; public class Program2 { SajatPanel panel1; JFrame ablak; Program2() { panel1 = new SajatPanel(); ablak = new JFrame(); ablak.setSize(400, 400); ablak.add(panel1); ablak.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ablak.setVisible(true); } public static void main(String[] a) { new Program2(); } class SajatPanel extends JPanel { public void paint(Graphics g) { g.setColor (Color.red); g.drawArc (5, 15, 50, 75, 25, 165); } } }