I don't really know....I think it has to seem like a privilege to be in the group, and if there is any bad behavior they're out.
I haven't had any bad behavior, but there has been a bit of laziness and wanting to quit on the "boring" parts like weeding. I was stopping for popsicle breaks about halfway through my lesson plan, but found that the boys especially lost interest once they had eaten their treat and were asking to leave.
I get really annoyed with kids who get whiny and say they're bored, so I told them all that the class wasn't a requirement and I only wanted those who wanted to learn to come. If they weren't interested in working and playing then please don't waste my time. Those who persevere through the work AND the fun would get their handlens and lanyard at the end and get to attend the final "graduation" bbq and show their parents what they did with all their hard work. In other words if you start something, don't quit, see it through to the end. (A few think I'm mean. Too bad.)
I did send one boy home when he got whiny and said he was bored. His mom made him help her with housework.

He showed up a few days later on his own and asked if I would let him pull the weeds around his pumpkin and mulch it. The activity that he originally balked at.
But the clincher for most was moving the popsicle treat time to the very end.