• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Maximizing the Jframe in Swings

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
What a show! What atmosphere! What fun! What a tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic