How to display the GUI that we developed, at middle of monitor screen

I want to display my GUI at middle of monitor screen

display =new JTextArea(5,20);

JScrollPane scroller =new JScrollPane(display);

getContentPane().add(scroller, BorderLayout.SOUTH);

getContentPane().add(gui);

pack();

setSize(300,250);

show();

[360 byte] By [MissJavaaa] at [2007-10-3 2:58:10]
# 1
JFrame.setLocationRelativeTo()It centers the window if the argument passed to it is null.
myjavasticka at 2007-7-14 20:47:35 > top of Java-index,Desktop,Core GUI APIs...