public DriverUserInterface( String userName, String password, JPanel graphicPanel, LoginUserInterface loginUserInterface) { this.driver = (Driver) driverService.login(userName, password); this.graphicPanel = graphicPanel; this.loginUserInterface = loginUserInterface; WindowUtilities.setNativeLookAndFeel(); reportLocationButton = new JButton("اعلام موقعیت", new ImageIcon("img/reportloc.png")); reportLocationButton.setVerticalTextPosition(AbstractButton.BOTTOM); reportLocationButton.setHorizontalTextPosition(AbstractButton.CENTER); reportLocationButton.setActionCommand("reportloc"); reportLocationButton.addActionListener(this); loadShipmentButton = new JButton("بارگذاری", new ImageIcon("img/load.png")); loadShipmentButton.setVerticalTextPosition(AbstractButton.BOTTOM); loadShipmentButton.setHorizontalTextPosition(AbstractButton.CENTER); loadShipmentButton.setActionCommand("loadShipment"); loadShipmentButton.addActionListener(this); mainMenuButton = new JButton(new ImageIcon("img/home.png")); mainMenuButton.setActionCommand("mainmenu"); mainMenuButton.addActionListener(this); refreshButton = new JButton(new ImageIcon("img/refresh.png")); refreshButton.setActionCommand("update"); refreshButton.addActionListener(this); logoutButton = new JButton(new ImageIcon("img/logout.png")); logoutButton.setActionCommand("logout"); logoutButton.addActionListener(this); reportButton = new JButton("اعلام"); reportButton.setActionCommand("report"); reportButton.addActionListener(this); pickupButton = new JButton("بارگذاری"); pickupButton.setActionCommand("pickup"); pickupButton.addActionListener(this); title = new JLabel("در سیستم به نام " + driver.getUsername()); title.setFont(new Font("sansserif", Font.PLAIN, 24)); title.setForeground(new Color(0.85f, 0.0f, 0.0f)); this.update("main"); }