This has changed in 1.4, but another way to do it in 1.3 is by using the
Robot to automagically click on the maximize button.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class StartRobot {
public static void main(String args[]) throws AWTException {
JFrame frame = new JFrame();
frame.setSize(200, 200);
frame.setLocation(200, 200);
frame.setVisible(true);
Robot robot = new Robot();
Point point = frame.getLocationOnScreen();
robot.mouseMove(p.x + 5, p.y + 5);
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
robot.keyPress(KeyEvent.VK_X);
}
}
Brian Majewski
Systems Architect
Chrome Systems Corporation
[EMAIL PROTECTED]
PHONE: +1-503-963-6410 / +1-800-936-8906
FAX: +1-503-963-6312
www.chrome.com
Notice: This e-mail transmission and/or the attachments accompanying it may
contain confidential information belonging to the sender or Chrome Systems
Corporation. The information is only for the use of the intended recipient.
If you have received this transmission in error, please notify the sender
immediately by reply e-mail, and then destroy all copies of the
transmission.
-----Original Message-----
From: Erb [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 7:27 AM
To: [EMAIL PROTECTED]
Subject: Re: [Eap-features] app window restarting size
First, I believe this might change in 1.4.
Second, there are a couple of tricks to work around this.
You could test for the window being resized to the screen size and assume
it is a maximizing. In 1.3.1, Java did not know about the taskbar being
removed from the
usable screen area, though. Not sure if this was changed in 1.4.
Thomas Singer wrote:
> Currently it's impossible to maximize a Java window directly from Java.
> IDEA just remembers the window bounds and restores them. The coordinates
> of the left-top corner of a maximized window are (-4; -4). Therefor the
> window overlaps the screen borders by 4 pixels.
>
> Tom
>
>
> At 19:03 19.02.2002 -0800, you wrote:
>
>> Yes, please fix this, it's very annoying. I have two monitors, and IDEA
>> always opens up with a few pixels showing on the 2nd monitor, when it
>> should
>> just open up maximized on my main monitor.
>>
>> Jason Boehle
>> [EMAIL PROTECTED]
>>
>>
>> -----Original Message-----
>> From: Colin Stuart [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, February 19, 2002 8:14 PM
>> To: '[EMAIL PROTECTED]'
>> Subject: [Eap-features] app window restarting size
>>
>>
>>
>> If you close IDEA with it maximized, it will not restart maximized,
>> but it
>> will be full-screen size. Std. window behavior is to remember the
>> 'restored' size, and start in the state it was last started in (in this
>> case, maximized).
>>
>> -Colin
>
>
>
> _______________________________________________
> Eap-features mailing list
> [EMAIL PROTECTED]
> http://www.intellij.com/mailman/listinfo/eap-features
>
--
Erb
==============================================================
"The only time I like in the morning is afternoon."
- Russell D. Cooper
"If you do everything, then you're all done."
- Melissa F. Cooper
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-features
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-features