• Post Reply Bookmark Topic Watch Topic
  • New Topic

Maximizing the Jframe in Swings

 
M Srinivas
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

My Frame Normal position is (640X480).I am using JDK 1.3.1 package.
While maximizing the Jframe it takes bounds as (800 x 600), But the next frame is opening with ( 808 X 580 )bounds, Getting different bounds.

Applying code, Getting parent frame's sizes is : frame.setSize(getWidth(),getHeight());
It doesn't takes the exact bounds of the parent frame, How can i solve this problem.
 
Sainath Veepuri
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Srinivas,
I would like to help you out.
My life becomes much easier if you could post your code.
- SAi
 
M Srinivas
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi sainath,

i am writing simple code:
regobj.regframe.setSize(loginframe.getWidth(),loginframe.getHeight());

My Application is simple Login Screen and next 5 screens are there.
Whats the requirement is Login Page is in fixed bounds 640 X 480. And it is resizable.
Now i have to Maximize this LoginScreen, then next screens also open with this same bounds like 800 X 600.
I solved this solution, But next screens are opening with 808 X 580,so little bit smaller gap is coming,
Now u understood the requirement sainath?
I applied the code as above. This code is solving the problem but not getting the exact bounds.
So now u r life is free for solving,HAHAHAHA...

Thanx sai,
Srinivas
 
Sainath Veepuri
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Srinivas,

Originally posted by M Srinivas:

regobj.regframe.setSize(loginframe.getWidth(),loginframe.getHeight());

My Application is simple Login Screen and next 5 screens are there.
Whats the requirement is Login Page is in fixed bounds 640 X 480. And it is resizable.
Now i have to Maximize this LoginScreen, then next screens also open with this same bounds like 800 X 600.
I solved this solution, But next screens are opening with 808 X 580,so little bit smaller gap is coming,
I applied the code as above. This code is solving the problem but not getting the exact bounds.


Would you print.. to check if the login screen size and the next screen size is same.
It should be same if you are using the login screen size for the next screen also. There is no chance of a differed size!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!