JDialog size
Hello everyone,
I have a JDialog that I want to fill the whole screen, so I've done:
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
setLocation(0,0);
setSize(new Dimension(screenSize.width, screenSize.height));
it's all good but since I have the windows taskbar, the JDialog is not entirely visible...how do I adjust the JDialog's size in order to make it all visible when I have the wnds taskbar?
Can anyone help me?
thanx
Hi again,
I have another doubt on JDialogs...
I included this code so that when pressing the key Esc it closes the window.
protected JRootPane createRootPane()
{
JRootPane rootPane = new JRootPane();
rootPane.getInputMap( JComponent.WHEN_IN_FOCUSED_WINDOW ).
put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "escPressed");
rootPane.getActionMap().put( "escPressed", new AbstractAction( "escPressed" )
{
public void actionPerformed( ActionEvent actionEvent )
{
dispose();
}
});
return rootPane;
}
But for the JDialogs that fill the entire screen the esc doesn't work.. does anyone know why this happens?
thanx