I picked up a rock and threw it into the window
Why would you throw a rock through a window?
I saw it and thought there wasn't any glass.
It is wrong to throw things at someone else's property. You should also have to pay back the damages you have caused.
It was an accident and I'm going to pay for the damages.
I'm glad you are paying for the damages, that's the right thing to do. We should always make sure we are following the law.