From e49ad21fbce74d45a9369cb35082af775051a94f Mon Sep 17 00:00:00 2001 From: Emmanuel SRIVASTAVA TIAMZON Date: Wed, 5 Mar 2025 21:26:48 +0100 Subject: [PATCH] Update DEV.2.1/TP/TP8-Evenements/2.Attente/MainAttente.java --- .../TP8-Evenements/2.Attente/MainAttente.java | 87 +++---------------- 1 file changed, 12 insertions(+), 75 deletions(-) diff --git a/DEV.2.1/TP/TP8-Evenements/2.Attente/MainAttente.java b/DEV.2.1/TP/TP8-Evenements/2.Attente/MainAttente.java index 880267d..d8a0efb 100644 --- a/DEV.2.1/TP/TP8-Evenements/2.Attente/MainAttente.java +++ b/DEV.2.1/TP/TP8-Evenements/2.Attente/MainAttente.java @@ -1,79 +1,16 @@ -import javax.swing.*; -import java.awt.*; +import javax.swing.*; -public class MainFond { - public static void main(String[] args) { - JFrame frame = new JFrame("Attente"); - frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); +public class MainAttente { + public static void main(String[] args) { + JFrame frame = new JFrame("Attente"); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - Attente test = new Attente(); + Attente panneau = new Attente(); + frame.add(panneau); + frame.addWindowListener(panneau); - frame.setSize(500,500); - frame.setLocation(500,250); - frame.setVisible(true); - } + frame.setSize(500, 500); + frame.setLocation(500, 250); + frame.setVisible(true); + } } - - -MainAttente.java:4: error: class MainFond is public, should be declared in a file named MainFond.java -public class MainFond { - ^ -./Attente.java:28: error: ';' expected - System.out.println("Fenetre arri pl") - ^ -./Attente.java:5: error: cannot find symbol -public class Attente extends JComponent implements WindowsListener { - ^ - symbol: class WindowsListener -./Attente.java:31: error: cannot find symbol - @Override public void windowActivated(WindowsEvent e) {} - ^ - symbol: class WindowsEvent - location: class Attente -./Attente.java:32: error: cannot find symbol - @Override public void windowOpened(WindowsEvent e) {} - ^ - symbol: class WindowsEvent - location: class Attente -./Attente.java:33: error: cannot find symbol - @Override public void windowClosing(WindowsEvent e) {} - ^ - symbol: class WindowsEvent - location: class Attente -./Attente.java:34: error: cannot find symbol - @Override public void windowClosed(WindowsEvent e) {} - ^ - symbol: class WindowsEvent - location: class Attente -./Attente.java:35: error: cannot find symbol - @Override public void windowIconified(WindowsEvent e) {} - ^ - symbol: class WindowsEvent - location: class Attente -./Attente.java:36: error: cannot find symbol - @Override public void windowDeiconified(WindowsEvent e) {} - ^ - symbol: class WindowsEvent - location: class Attente -./Attente.java:26: error: method does not override or implement a method from a supertype - @Override - ^ -./Attente.java:31: error: method does not override or implement a method from a supertype - @Override public void windowActivated(WindowsEvent e) {} - ^ -./Attente.java:32: error: method does not override or implement a method from a supertype - @Override public void windowOpened(WindowsEvent e) {} - ^ -./Attente.java:33: error: method does not override or implement a method from a supertype - @Override public void windowClosing(WindowsEvent e) {} - ^ -./Attente.java:34: error: method does not override or implement a method from a supertype - @Override public void windowClosed(WindowsEvent e) {} - ^ -./Attente.java:35: error: method does not override or implement a method from a supertype - @Override public void windowIconified(WindowsEvent e) {} - ^ -./Attente.java:36: error: method does not override or implement a method from a supertype - @Override public void windowDeiconified(WindowsEvent e) {} - ^ -16 errors