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

[529 byte] By [iland_girla] at [2007-10-3 3:52:07]
# 1
http://forum.java.sun.com/thread.jspa?threadID=763946&messageID=4358132
itchyscratchya at 2007-7-14 21:49:52 > top of Java-index,Desktop,Core GUI APIs...
# 2
I used the methods MinimumSize, PreferredSize and MaximumSize. Previously is the definition of the dimension.
patucosa at 2007-7-14 21:49:52 > top of Java-index,Desktop,Core GUI APIs...
# 3
thanx a lot for ponting the topic out. I search in other topics but I didn't find that one.tc
iland_girla at 2007-7-14 21:49:52 > top of Java-index,Desktop,Core GUI APIs...
# 4

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

iland_girla at 2007-7-14 21:49:52 > top of Java-index,Desktop,Core GUI APIs...