/*********************Pay Button Listener***************************************/
public class payListener implements ActionListener{
public void actionPerformed(ActionEvent e) {
replace();
Ticket getNewPayTime = new Ticket();
getNewPayTime.loadTicket(ticketIDNumber);
paymentTime = Ticket.paymentTime; //getting correct ticket pyament time, correction performed by replace method.
long timeDifference = paymentTime - entranceTime;
SimpleDateFormat sdf1 = new SimpleDateFormat("MMM dd,yyyy HH:mm");
Date paymentdate = new Date (paymentTime);
lPaymentTime.setText("Payment Time: " + sdf1.format(paymentdate));
SimpleDateFormat sdf2 = new SimpleDateFormat("HH:mm");
Date resultdate = new Date(timeDifference);
lTimeDifference.setText("Duration: " + sdf2.format(resultdate));
}
}
/*********************Pay Button Listener***************************************/
in the line
SimpleDateFormat sdf2 = new SimpleDateFormat("HH:mm");
how do i print time in hh:mm:ss format?