Exemplo n.º 1
0
  public MainFrame() {
    setTitle(Labels.TITLE);
    setLayout(new GridLayout(5, 1));
    setResizable(false);
    setVisible(true);

    topLabel = new Label(Labels.TOP);
    topLabel.setBorder(FRAME_PADDING);
    add(topLabel);

    inputPanel = new InputPanel(Labels.IP, Labels.START_PORT, Labels.END_PORT);
    inputPanel.setBorder(FRAME_PADDING);
    add(inputPanel);

    buttonPanel = new ButtonPanel(Labels.SCAN, Labels.RESET);
    buttonPanel.setBorder(BUTTON_PADDING);
    add(buttonPanel);

    outputPanel = new OutputPanel();
    outputPanel.setBorder(FRAME_PADDING);
    add(outputPanel);

    bottomLabel = new Label(Labels.PRESS_SCAN);
    bottomLabel.setBorder(FRAME_PADDING);
    add(bottomLabel);

    setSize(FRAME_WIDTH, FRAME_HEIGHT);
    setLocationRelativeTo(null);
  }
Exemplo n.º 2
0
 public void clearInputFields() {
   inputPanel.getIpAddressInput().setText("");
   inputPanel.getStartPortInput().setText("");
   inputPanel.getEndPortInput().setText("");
 }
Exemplo n.º 3
0
 public String getEndPort() {
   return inputPanel.getEndPortInput().getText();
 }
Exemplo n.º 4
0
 public String getIpAddress() {
   return inputPanel.getIpAddressInput().getText();
 }