Tail program written in javafx