WORKIN ALONE ALONG THE ROAD
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								bin/BillGUI/ButtonQuitListener.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								bin/BillGUI/ButtonQuitListener.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -4,7 +4,7 @@ public class HesSoGarage { | |||||||
|     public static void main(String[] args) { |     public static void main(String[] args) { | ||||||
|         GarageManager garageManager = new GarageManager(); |         GarageManager garageManager = new GarageManager(); | ||||||
|         ManagerGui managerGui; |         ManagerGui managerGui; | ||||||
|         String name = "<em>Garage manager</em> <br> Prestations"; |         String name = "Garage manager\nPrestations"; | ||||||
|         String logoFilePath = "src/logo_garage.png"; |         String logoFilePath = "src/logo_garage.png"; | ||||||
|         managerGui = new ManagerGui(name, logoFilePath, garageManager.getServices()); |         managerGui = new ManagerGui(name, logoFilePath, garageManager.getServices()); | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -30,7 +30,7 @@ public class ManagerGui extends JFrame{ | |||||||
|  |  | ||||||
|         //Create and add header |         //Create and add header | ||||||
|         logo = new ImageIcon(logoFilePath); |         logo = new ImageIcon(logoFilePath); | ||||||
|         Jlogo = new JLabel(name); |         Jlogo = new JLabel(logo); | ||||||
|         Jname = new JLabel(name); |         Jname = new JLabel(name); | ||||||
|         this.add(Jname); |         this.add(Jname); | ||||||
|         this.add(Jlogo); |         this.add(Jlogo); | ||||||
| @@ -48,8 +48,8 @@ public class ManagerGui extends JFrame{ | |||||||
|         } |         } | ||||||
|  |  | ||||||
|         //Create and add button  |         //Create and add button  | ||||||
|         JButton ButtonBill = new JButton(); |         JButton ButtonBill = new JButton("Show bill"); | ||||||
|         JButton ButtonQuit = new JButton(); |         JButton ButtonQuit = new JButton("Quit"); | ||||||
|         this.add(ButtonBill); |         this.add(ButtonBill); | ||||||
|         this.add(ButtonQuit); |         this.add(ButtonQuit); | ||||||
|  |  | ||||||
| @@ -58,7 +58,9 @@ public class ManagerGui extends JFrame{ | |||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
|  | /** | ||||||
|  |  *  | ||||||
|  |  */ | ||||||
| class Row { | class Row { | ||||||
|     JLabel label; |     JLabel label; | ||||||
|     JSpinner spinner; |     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(); | ||||||
|  |     } | ||||||
|  |      | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user