[Bluej-discuss] Programming with BlueJ exc 3.29 24 -> 12 hour clock.
Bjorn
bpacher1 at gmail.com
Sun Dec 30 15:09:41 GMT 2007
Hey guys,
I'm so stuck to this excercise, I have no clue anymore.
Im trying to change the clock into a 12 hour clock so I changed the way
it displayed the clock, however I cannot read the current time from the
source, so there is no way I can actualy apply the rule on it.
/**
* Update the internal string that represents the display.
*/
private void updateDisplay()
{
if(hours > 12) {
displayString = hours.getDisplayValue() + ":" +
minutes.getDisplayValue()+ " am";
}else { displayString = hours.getDisplayValue() + ":" +
minutes.getDisplayValue()+ " pm";
}
}
I'm probably horrid wrong, but I can't figure it out.
More information about the bluej-discuss
mailing list