public void handleAttack() {
        target = addrField.getText();
        numThreads = (int) threadSlider.getValue();
        udpflood.setTarget(target);
        udpflood.setThreads(numThreads);
        if (udpflood.isRunning()) {
            attackBtn.setText("Start Attack");
            udpflood.stop();
        }
        else {
            attackBtn.setText("Stop Attack");
            udpflood.start();
        }
    }