> how can i display the jframe at the middle of screen?give the frame a size - eitherframe.setSize(..);orframe.pack();thenframe.setLocationRelativeTo(null);> how can i hide it ?you must be joking - how do you show it?
you can get the screen size using this function(java.awt.Toolkit.getDefaultToolkit().getScreenSize().width()-yourScreen.width())/2similarly for height..
> and how can i hide it ?I think this might work:yourJFrame.hide()Or use setVisible (I don't recall exactly, but check the APIs). I do hope there's another JFrame that will show that frame again...