diff --git a/DEV.2.1/TP/TP8-Evenements/1.Fond/.nfs0000000000e4b93f00000006 b/DEV.2.1/TP/TP8-Evenements/1.Fond/.nfs0000000000e4b93f00000006 deleted file mode 100644 index b33bebe..0000000 --- a/DEV.2.1/TP/TP8-Evenements/1.Fond/.nfs0000000000e4b93f00000006 +++ /dev/null @@ -1,37 +0,0 @@ -import java.awt.*; -import javax.swing.*; - -public class Fond extends JPanel implements ActionListener { - private JButton Cyan, Magenta, Jaune; - - public Fond() { - this.setLayout(null); - - this.Cyan = new JButton("Cyan"); - this.Magenta = new JButton("Magenta"); - this.Jaune = new JButton("Jaune"); - - this.Cyan.setBounds(100,50,100,20); - this.Magenta.setBounds(220,50,100,20); - this.Jaune.setBounds(320,50,100,20); - - this.Cyan.addActionListener(this); - this.Magenta.addActionListener(this); - this.Jaune.addActionListener(this); - - this.add(this.Cyan); - this.add(this.Magenta); - this.add(this.Jaune); - } - - @Override - public void actionPerformed(ActionEvent evenement) { - if (evenement.getSource() == this.Cyan) { - this.setBackground(Color.CYAN); - } else if (evenement.getSource() == this.Magenta) { - this.setBackground(Color.MAGENTA); - } else if (evenement.getSource() == this.Jaune) { - this.setBackground(Color.YELLOW); - } - } -} \ No newline at end of file diff --git a/DEV.2.1/TP/TP8-Evenements/1.Fond/.nfs0000000000e4d56600000007 b/DEV.2.1/TP/TP8-Evenements/1.Fond/.nfs0000000000e4d56600000007 deleted file mode 100644 index 29a9a37..0000000 --- a/DEV.2.1/TP/TP8-Evenements/1.Fond/.nfs0000000000e4d56600000007 +++ /dev/null @@ -1,72 +0,0 @@ -import javax.swing.*; -import java.awt.*; - -public class MainFond { - public static void main(String[] args) { - JFrame frame = new JFrame("Fond"); - frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - - - Fond panel = new Fond(); - - frame.add(panel); - frame.setSize(500,500); - frame.setLocation(500,250); - frame.setVisible(true); - } -} - - -./Fond.java:4: error: cannot find symbol -public class Fond extends JPanel implements ActionListener { - ^ - symbol: class ActionListener -./Fond.java:27: error: cannot find symbol - public void actionPerformed(ActionEvent evenement) { - ^ - symbol: class ActionEvent - location: class Fond -./Fond.java:17: error: incompatible types: Fond cannot be converted to ActionListener - this.Cyan.addActionListener(this); - ^ -./Fond.java:18: error: incompatible types: Fond cannot be converted to ActionListener - this.Magenta.addActionListener(this); - ^ -./Fond.java:19: error: incompatible types: Fond cannot be converted to ActionListener - this.Jaune.addActionListener(this); - ^ -./Fond.java:26: error: method does not override or implement a method from a supertype - @Override - ^ -./Fond.java:33: error: cannot find symbol - setBackground(Color.JAUNE); - ^ - symbol: variable JAUNE - location: class Color -Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output -7 errors -[srivasta@vm-srivasta 1.Fond]$ q -[srivasta@vm-srivasta 1.Fond]$ javac MainFond.java -./Fond.java:4: error: cannot find symbol -public class Fond extends JPanel implements ActionListener { - ^ - symbol: class ActionListener -./Fond.java:28: error: cannot find symbol - public void actionPerformed(ActionEvent evenement) { - ^ - symbol: class ActionEvent - location: class Fond -./Fond.java:18: error: incompatible types: Fond cannot be converted to ActionListener - this.Cyan.addActionListener(this); - ^ -./Fond.java:19: error: incompatible types: Fond cannot be converted to ActionListener - this.Magenta.addActionListener(this); - ^ -./Fond.java:20: error: incompatible types: Fond cannot be converted to ActionListener - this.Jaune.addActionListener(this); - ^ -./Fond.java:27: error: method does not override or implement a method from a supertype - @Override - ^ -Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output -6 errors diff --git a/DEV.2.1/TP/TP8-Evenements/3.Radio/MainRadio.class b/DEV.2.1/TP/TP8-Evenements/3.Radio/MainRadio.class deleted file mode 100644 index 3587d8b..0000000 Binary files a/DEV.2.1/TP/TP8-Evenements/3.Radio/MainRadio.class and /dev/null differ diff --git a/DEV.2.1/TP/TP9-Event..suite/1./Mafenetre.class b/DEV.2.1/TP/TP9-Event..suite/1./Mafenetre.class new file mode 100644 index 0000000..e007edd Binary files /dev/null and b/DEV.2.1/TP/TP9-Event..suite/1./Mafenetre.class differ diff --git a/DEV.2.1/TP/TP9-Event..suite/1./Mafenetre.java b/DEV.2.1/TP/TP9-Event..suite/1./Mafenetre.java new file mode 100644 index 0000000..b913396 --- /dev/null +++ b/DEV.2.1/TP/TP9-Event..suite/1./Mafenetre.java @@ -0,0 +1,15 @@ +import javax.swing.*; +import java.awt.*; + +public class Mafenetre extends JFrame { + + public Mafenetre() { + super("Volume"); + this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + this.setSize(697,156); + this.setLocation(500,250); + + Volume instance = new Volume(); + } + +} \ No newline at end of file diff --git a/DEV.2.1/TP/TP9-Event..suite/1./MainVolume.class b/DEV.2.1/TP/TP9-Event..suite/1./MainVolume.class new file mode 100644 index 0000000..937cb9c Binary files /dev/null and b/DEV.2.1/TP/TP9-Event..suite/1./MainVolume.class differ diff --git a/DEV.2.1/TP/TP9-Event..suite/1./MainVolume.java b/DEV.2.1/TP/TP9-Event..suite/1./MainVolume.java new file mode 100644 index 0000000..fcad058 --- /dev/null +++ b/DEV.2.1/TP/TP9-Event..suite/1./MainVolume.java @@ -0,0 +1,10 @@ +import javax.swing.*; +import java.awt.*; + +public class MainVolume { + public static void main(String[] args) { + Mafenetre fenetre = new Mafenetre(); + fenetre.setVisible(true); + + } +} \ No newline at end of file diff --git a/DEV.2.1/TP/TP9-Event..suite/1./MouseWheel.class b/DEV.2.1/TP/TP9-Event..suite/1./MouseWheel.class new file mode 100644 index 0000000..c9e6dff Binary files /dev/null and b/DEV.2.1/TP/TP9-Event..suite/1./MouseWheel.class differ diff --git a/DEV.2.1/TP/TP9-Event..suite/1./MouseWheel.java b/DEV.2.1/TP/TP9-Event..suite/1./MouseWheel.java new file mode 100644 index 0000000..99e5789 --- /dev/null +++ b/DEV.2.1/TP/TP9-Event..suite/1./MouseWheel.java @@ -0,0 +1,16 @@ +import javax.swing.*; +import java.awt.event.*; +import java.awt.*; + +public class MouseWheel implements MouseWheelListener { + + public MouseWheel() { + super(); + } + + @Override + public void mouseWheelMoved(MouseWheelEvent evenement) { + + } + +} \ No newline at end of file diff --git a/DEV.2.1/TP/TP9-Event..suite/1./Volume.class b/DEV.2.1/TP/TP9-Event..suite/1./Volume.class new file mode 100644 index 0000000..ba7977a Binary files /dev/null and b/DEV.2.1/TP/TP9-Event..suite/1./Volume.class differ diff --git a/DEV.2.1/TP/TP9-Event..suite/1./Volume.java b/DEV.2.1/TP/TP9-Event..suite/1./Volume.java new file mode 100644 index 0000000..5c26c68 --- /dev/null +++ b/DEV.2.1/TP/TP9-Event..suite/1./Volume.java @@ -0,0 +1,21 @@ +import javax.swing.*; +import java.awt.*; + +public class Volume extends JComponent { + + public Volume() { + super(); + } + + @Override + protected void paintComponent(Graphics pinceau) { + Graphics secondPinceau = pinceau.create(); + this.setColor(this.getForeground()); + + this.setBackground(new Color(255,30,255)); + + this.setColor(Color.GRAY); + this.fillOval(10, 70, 100, 100); + } + +} \ No newline at end of file diff --git a/DEV.2.1/cours-java/8 Exceptions.docx b/DEV.2.1/cours-java/8 Exceptions.docx new file mode 100644 index 0000000..7193e5b Binary files /dev/null and b/DEV.2.1/cours-java/8 Exceptions.docx differ