I have both a JPanel and a content pane. how do I center the contents of each of those?
Printable View
I have both a JPanel and a content pane. how do I center the contents of each of those?
Have you gone through the Swing tutorials, in particular the section on using layout managers? That would be where I'd start as the details on the solution you seek can likely be found there. Please come back if you're still stuck after reading these pages and show us what you've got (your code).
Much luck!