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); }
public void clearInputFields() { inputPanel.getIpAddressInput().setText(""); inputPanel.getStartPortInput().setText(""); inputPanel.getEndPortInput().setText(""); }
public String getEndPort() { return inputPanel.getEndPortInput().getText(); }
public String getIpAddress() { return inputPanel.getIpAddressInput().getText(); }