diff --git a/bin/BillGUI/ButtonQuitListener.class b/bin/BillGUI/ButtonQuitListener.class new file mode 100644 index 0000000..c78f901 Binary files /dev/null and b/bin/BillGUI/ButtonQuitListener.class differ diff --git a/bin/BillGUI/HesSoGarage.class b/bin/BillGUI/HesSoGarage.class index 2402ace..1928a32 100644 Binary files a/bin/BillGUI/HesSoGarage.class and b/bin/BillGUI/HesSoGarage.class differ diff --git a/bin/BillGUI/ManagerGui.class b/bin/BillGUI/ManagerGui.class index 723861d..b394bfe 100644 Binary files a/bin/BillGUI/ManagerGui.class and b/bin/BillGUI/ManagerGui.class differ diff --git a/bin/BillGUI/Row.class b/bin/BillGUI/Row.class index 55b9887..69344f0 100644 Binary files a/bin/BillGUI/Row.class and b/bin/BillGUI/Row.class differ diff --git a/src/BillGUI/HesSoGarage.java b/src/BillGUI/HesSoGarage.java index 90e3c50..200d97d 100644 --- a/src/BillGUI/HesSoGarage.java +++ b/src/BillGUI/HesSoGarage.java @@ -4,7 +4,7 @@ public class HesSoGarage { public static void main(String[] args) { GarageManager garageManager = new GarageManager(); ManagerGui managerGui; - String name = "Garage manager
Prestations"; + String name = "Garage manager\nPrestations"; String logoFilePath = "src/logo_garage.png"; managerGui = new ManagerGui(name, logoFilePath, garageManager.getServices()); } diff --git a/src/BillGUI/ManagerGui.java b/src/BillGUI/ManagerGui.java index 0d38a1b..7a3b2e2 100644 --- a/src/BillGUI/ManagerGui.java +++ b/src/BillGUI/ManagerGui.java @@ -30,7 +30,7 @@ public class ManagerGui extends JFrame{ //Create and add header logo = new ImageIcon(logoFilePath); - Jlogo = new JLabel(name); + Jlogo = new JLabel(logo); Jname = new JLabel(name); this.add(Jname); this.add(Jlogo); @@ -48,8 +48,8 @@ public class ManagerGui extends JFrame{ } //Create and add button - JButton ButtonBill = new JButton(); - JButton ButtonQuit = new JButton(); + JButton ButtonBill = new JButton("Show bill"); + JButton ButtonQuit = new JButton("Quit"); this.add(ButtonBill); this.add(ButtonQuit); @@ -58,7 +58,9 @@ public class ManagerGui extends JFrame{ } } - +/** + * + */ class Row { JLabel label; JSpinner spinner; @@ -69,5 +71,28 @@ class Row { } } +/** + * + */ +class ButtonQuitListener implements ActionListener { + JFrame Jf; + /** + * + * @param Jf + */ + ButtonQuitListener(JFrame Jf){ + this.Jf = Jf; + } + /** + * + * @param e + */ + @Override + public void actionPerformed(ActionEvent e){ + Jf.dispose(); + } + +} +