|
-
Nov 10th, 2002, 11:30 PM
#1
Thread Starter
Addicted Member
Maximizing a JWindow?
Does anyone know how to maximize a JWindow through code?
To protect time is to protect everything...
-
Nov 13th, 2002, 02:22 AM
#2
Dazed Member
That is a good question. A JWindow is usually used to display somthing that needs to be in it's own window without the adornments added by a JFrame. You would have to move or close this window programmatically because of the absence of the close, min, and max buttons.
I don't think that there is a way to maximize a JWindow from the window itself. You would have to provide an alternate button for the action and then scale the JWindow to the size of the screen.
Last edited by Dilenger4; Nov 13th, 2002 at 02:27 AM.
-
Nov 13th, 2002, 01:26 PM
#3
Scaling a window to the screen size is not the same as maximizing.
But there seems to be no way of maximizing a JWindow. Why do you want to do it?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 13th, 2002, 02:14 PM
#4
Dazed Member
Posted by CornedBee
Scaling a window to the screen size is not the same as maximizing.
Sure it is. Take Explorer when in full screen and click restore, the button changes to maximize. Click maximize and the window is scaled back to the screen size.
-
Nov 13th, 2002, 03:12 PM
#5
???
I don't use IE. 
Windows maintains an internal state of a window, including if it is maximized or not. This state is not changed when you just resize the window. It has a few effects, like that a maximized window can not be moved or resized.
But since a JWindow doesn't have a title bar, a resizable frame or any buttons resizing to screen size has the same effect as maximizing. Only the same effect, mind you, from the perspective of Windows it's not the same.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 13th, 2002, 04:23 PM
#6
Thread Starter
Addicted Member
Well thats all I want is to "setSize" the JWindow, or JFrame to the size of the screen.
To protect time is to protect everything...
-
Nov 14th, 2002, 03:42 PM
#7
Hyperactive Member
To get the size of the screen use this
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
-
Nov 14th, 2002, 11:16 PM
#8
Thread Starter
Addicted Member
Well thank you, that works.
To protect time is to protect everything...
-
Nov 17th, 2002, 03:42 PM
#9
Dazed Member
No problem
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|