2013. 5. 29.

How to position dialog box on center of window?

final JDialog d = new JDialog();
d.setSize(200,200);
d.setLocationRelativeTo(null); // <====== USE THIS CODE !!!!
d.setVisible(true);

댓글 없음:

댓글 쓰기