Esempio n. 1
0
 private void addTabPanel(List<AbstractPanel> panelList, TabbedPanel tab) {
   AbstractPanel panel = null;
   for (int i = 0; i < panelList.size(); i++) {
     try {
       panel = panelList.get(i);
       tab.add(panel, panel.getName());
       // ZAP: added icon
       tab.addTab(panel.getName() + " ", panel.getIcon(), panel);
     } catch (Exception e) {
       // ZAP: Log the exception
       logger.error(e.getMessage(), e);
     }
   }
 }
Esempio n. 2
0
  public void setUpPanel() {
    this.scrapePanel = new JPanel();
    this.scrapePanel.setBorder(BorderFactory.createTitledBorder(Constants.URL_SCRAPE));
    // this.scrapePanel.setBackground(Color.darkGray);
    this.scrapePanel.setLayout(new GridBagLayout());

    this.personalPanel = new JPanel();
    this.personalPanel.setBorder(BorderFactory.createTitledBorder(Constants.PERSONAL_INFORMATION));
    // this.personalPanel.setBackground(Color.darkGray);
    this.personalPanel.setLayout(new GridBagLayout());

    super.getPanel().setLayout(new GridLayout(2, 1));
    super.getPanel().add(this.scrapePanel);
    super.getPanel().add(this.personalPanel);
  }
Esempio n. 3
0
  public void init() {
    super.setName(Constants.SOFTWARE_NAME);
    this.setSize(Constants.WINDOW_WIDTH / 2, Constants.WINDOW_HEIGHT / 2);
    this.setResizable(false);
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    /* Place frame in the middle of the screen */
    try {
      super.center(this);
    } catch (Exception e) {
      LOGGER.error(Constants.ERROR_MESSAGE, e);
    }

    setUpPanel();
    setUpLabel();
    setUpTextField();
    setUpButton();
  }