As custard said, pre-finishing the panel is the normal or standard procedure so that unfinished edges don't show later, plus make the panel a reasonably snug fit.
But if you must fix the panel, three methods are commonly espoused.
1. Space balls, already mentioned by others.
2. Put a blob of glue at the centre point of the grooves that take the end grain of the panel.
3. Drive a brad or pin at an angle through the panel at the centre point of the ends into the framework.
All three are time consuming and fiddly which only adds to the stress factor that can occur during glue-ups, especially more complex ones involving three or four panels and framing. One solution to matching the centre of the panel with the groove at either end in 2 and 3 above is a bit of masking tape on both the panel and the framework with a pencil marks that need to be lined up during the glue-up.
And to finish, to answer the question you might have of whether I use methods 1, 2 or 3, the answer is no, unless I happen to be in a situation where someone I'm working for insists I use one of them. I can do without the time wasting boogering about during a glue-up, and prefer the standard pre-finish panels technique prior to assembly method. Slainte.