private void voteButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_voteButtonActionPerformed
        if(!ProposalLogic.isExpired(getProposal())) {
            int option = optionComboBox.getSelectedIndex();

            if(ProposalLogic.vote(proposal, option)){
                JOptionPane.showMessageDialog(this,
                       "Vote cast!");
            }
            else{
                JOptionPane.showMessageDialog(this,
                    "Voting failed",
                    "Error",
                    JOptionPane.ERROR_MESSAGE);
            }
        }
        else {
            JOptionPane.showMessageDialog(this, "This proposal is already expired!");
        }
    }//GEN-LAST:event_voteButtonActionPerformed