Results 1 to 9 of 9
- 07-03-2012, 07:16 AM #1
Senior Member
- Join Date
- Jan 2012
- Location
- TamilNadu
- Posts
- 162
- Rep Power
- 2
Layout Not suitable For All Window resolution
Happy To Meet You!
.gif)
I have complete my small software sir,
But! If i install it in different system. It getting changed depending upon the screen size (the full size of the software is not visible)..,
I have tried with different layout (absolute, null,flow layout) also. Still i facing the problem sir..,
What i have to do to set my software suitable for all size of window's sir..,
Thank You for your Help Sir..,
- 07-03-2012, 09:46 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,448
- Rep Power
- 16
Re: Layout Not suitable For All Window resolution
What layout are you using?
The usual one would be BorderLayout each section of which contains panels with other (non-absolute) layouts.
Are you trying to squeeze too much onto the screen such that a smaller screen couldn't possibly hold it all?Please do not ask for code as refusal often offends.
- 07-03-2012, 11:48 AM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,394
- Blog Entries
- 7
- Rep Power
- 17
Re: Layout Not suitable For All Window resolution
And maybe your JFrame has an absolute size (too big to fit on the screen). Use Toolkit.getDefaultToolkit().getScreenSize() instead.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 07-03-2012, 11:50 AM #4
Senior Member
- Join Date
- Jan 2012
- Location
- TamilNadu
- Posts
- 162
- Rep Power
- 2
- 07-03-2012, 11:56 AM #5
Senior Member
- Join Date
- Jan 2012
- Location
- TamilNadu
- Posts
- 162
- Rep Power
- 2
Re: Layout Not suitable For All Window resolution
Thank you Mr.JosAH sir..,
as you said i am using absolute size only in that frame form..,
i was use NetBeans IDE to develop it sir.., is it will angry. if i using "Toolkit.getDefaultToolkit().getScreenSize()" in that sir..,
Thank you sir..,- Raj
- 07-03-2012, 12:41 PM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 10,448
- Rep Power
- 16
Re: Layout Not suitable For All Window resolution
Don't use the GUI builder.
As you can see it's using Absolute everywhere, which means that you have told Swing where everything goes so it cannot even attempt to resize and layout things based on the window size.Please do not ask for code as refusal often offends.
- 07-09-2012, 09:30 AM #7
Senior Member
- Join Date
- Jan 2012
- Location
- TamilNadu
- Posts
- 162
- Rep Power
- 2
Re: Layout Not suitable For All Window resolution
Good To Meet You Sir!
.gif)
As you said i can see the improvement..,
About the above mentioned problem i have add the fallowing method to fit the JFrame on all kinds of windows and i can call this method when the window is open..,
But!Java Code:public void setLot() { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); this.setSize(screenSize.width, screenSize.height); this.validate(); }
inside of the JFrame components are in "out of screen size"..,
How to fit my components suitable with the JFrame size sir..,
Thank you..,- Raj
- 07-09-2012, 09:44 AM #8
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,394
- Blog Entries
- 7
- Rep Power
- 17
Re: Layout Not suitable For All Window resolution
I don't think I fully understand your remark but my guess is that although now your JFrame fits on the screen, the components in that JFrame still are too large; right? If so you didn't use LayoutManagers to place (and size) your components; that's what you get when you use absolute positioning and sizing of your components ...
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 07-09-2012, 11:31 AM #9
Moderator
- Join Date
- Apr 2009
- Posts
- 10,448
- Rep Power
- 16
Re: Layout Not suitable For All Window resolution
Again, you have told Swing where to put these components (by using Absolute positioning), so it's no aurprise that Swing has done exactly that.
You will need to use a proper Layout.
Here's the Layout tutorial.Please do not ask for code as refusal often offends.
Similar Threads
-
Is this a suitable architecture?
By newbie14 in forum NetworkingReplies: 0Last Post: 03-03-2012, 04:16 AM -
Grid Layout change layout alignment of control s
By rellicott in forum SWT / JFaceReplies: 1Last Post: 02-13-2012, 05:11 PM -
No suitable driver found
By chinna in forum New To JavaReplies: 3Last Post: 11-30-2011, 01:17 PM -
What layoutmanager is suitable for forms.
By Somelauw in forum AWT / SwingReplies: 9Last Post: 12-05-2009, 01:04 PM -
Which is the most suitable IDE ?
By javaamateur in forum NetBeansReplies: 2Last Post: 10-11-2009, 11:21 AM


LinkBack URL
About LinkBacks
Reply With Quote


Bookmarks