The 45-year-old suspect, who was known to the police, was arrested an hour after the first shots were reported at about 18:00 local time (08:30 GMT).
Police said they believed the man had acted alone. The crime scenes reportedly included a motel and a bar.
Prime Minister Scott Morrison said the shooting was not terror-related.
Mass shootings in Australia have been a rare occurrence since the country overhauled its gun laws in 1996, in the wake of a shooting in Tasmania that left 35 dead.