如何最佳定位摇摆舞?
JFrame frame = new JFrame("Foo");frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(new HexagonGrid());frame.pack();frame.setLocationRelativeTo(null);frame.setVisible(true);
frame.pack();frame.setLocationByPlatform(true);