By Alvin Alexander. Last updated: June 6, 2016 This is a simple way to center a JFrame in Java: myFrame.setLocationRelativeTo(null); java