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");
  }
  public SelectableTree() {
    super("JTree Selections");
    WindowUtilities.setNativeLookAndFeel();
    addWindowListener(new ExitListener());
    Container content = getContentPane();

    String[] namesplitStrings = mainDir.toString().split("\\\\");
    String filename = namesplitStrings[namesplitStrings.length - 1];
    DefaultMutableTreeNode root = new DefaultMutableTreeNode(filename);

    addChildren(root, mainDir);
    tree = new JTree(root);
    tree.addTreeSelectionListener(this);
    content.add(new JScrollPane(tree), BorderLayout.CENTER);
    currentSelectionField = new JTextField("Current Selection: NONE");
    content.add(currentSelectionField, BorderLayout.SOUTH);
    setSize(250, 275);
    setVisible(true);
  }