import javax.swing.*;
import java.awt.*;
public class Main extends JFrame {
private MyPanel panel = new MyPanel();
public Main() {
setTitle("coding");
setContentPane(panel);
setSize(250,250);
setVisible(true);
}
class MyPanel extends JPanel {
public void paintComponent(Graphics g) {
super.paintComponent(g);
g.setColor(Color.red);
g.drawArc(20,100,80,80,90,270);
}
}
public static void main(String[] args) {
new Main();
}
}
import javax.swing.*;
import java.awt.*;
public class Main extends JFrame {
private MyPanel panel = new MyPanel();
public Main() {
setTitle("coding");
setContentPane(panel);
setSize(250,250);
setVisible(true);
}
class MyPanel extends JPanel {
public void paintComponent(Graphics g) {
super.paintComponent(g);
g.setColor(Color.red);
int[] x = {80,40,80,120};
int[] y = {40,120,200,120};
g.drawPolygon(x,y,4);
}
}
public static void main(String[] args) {
new Main();
}
}
import javax.swing.*;
import java.awt.*;
public class Main extends JFrame {
private MyPanel panel = new MyPanel();
public Main() {
setTitle("coding");
setContentPane(panel);
setSize(250,250);
setVisible(true);
}
class MyPanel extends JPanel {
public void paintComponent(Graphics g) {
super.paintComponent(g);
g.setColor(Color.red);
g.fillRect(10,10,50,50);
g.setColor(Color.BLUE);
g.fillOval(10,70,50,50);
g.setColor(Color.green);
g.fillRoundRect(10,135,50,50,20,20);
g.setColor(Color.magenta);
g.fillArc(10,190,50,50,0,270);
g.setColor(Color.orange);
int[] x = {30,0,30,60};
int[] y = {250,275,300,275};
g.fillPolygon(x,y,4);
}
}
public static void main(String[] args) {
new Main();
}
}*/
import javax.swing.*;
import java.util.*;
import java.awt.event.*;
import java.awt.*;
public class Main extends JFrame {
private MyPanel panel = new MyPanel();
private Vector<Point>vStart = new Vector<Point>();
public Main() {
setTitle("pokenmon Go");
setContentPane(panel);
setSize(300,300);
setVisible(true);
}
class MyPanel extends JPanel{
public MyPanel() {
addMouseListener(new MyMouseListener());
}
}
class MyMouseListener extends MouseAdapter{
public void mousePreesed(MouseEvent e) {
Point P = e.getPoint();
vStart.add(P);
}
}
public static void main(String[] args) {
new Main();
}



