AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Netbeans Help? :-)

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
Inertia_sublimation
Guest





PostPosted: Wed Dec 24, 2003 5:35 am    Post subject: Netbeans Help? :-) Reply with quote



Hi everyone!

I was wondering, is this the place I can request assistance with some
features in NetBeans?
I am trying to design a GUI, Im *almost* done, but cant find the parameter
for setting a JFrame's initial start-up size.

Im using the NetBeans Frame Designer tool, and on startup, I want the Main
Form to take up a certain percentage of the User's Screen space. Ive already
gotten it to set its location to the middle of the screen
(setLocationRelativeTo(null)). I just havent found a way to imput an initial
start-up value for the Frame in the NetBeans Frame Designer interface.

Extremely sorry if this doesnt belong here... would anyone like to tell me
where I could post a question like this if so?


Back to top
Andrew Thompson
Guest





PostPosted: Wed Dec 24, 2003 12:17 pm    Post subject: Re: Netbeans Help? :-) Reply with quote



"Inertia_sublimation" <inertia_sublimation (AT) hotmail (DOT) com> wrote

....
Quote:
....(bad) features in NetBeans?
I am trying to design a GUI, Im *almost* done, but cant find the parameter
for setting a JFrame's initial start-up size.

I do not use net beans, but if you have
access to the _code_ [ you know, that
Java words that is your app.. Wink ],
you might try..

Component.setSize(int, int)

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site



Back to top
Ryan Stewart
Guest





PostPosted: Wed Dec 24, 2003 12:54 pm    Post subject: Re: Netbeans Help? :-) Reply with quote



"Andrew Thompson" <andrew64 (AT) bigNOSPAMpond (DOT) com> wrote

Quote:
"Inertia_sublimation" <inertia_sublimation (AT) hotmail (DOT) com> wrote in message
news:zA9Gb.14556$aw2.8241229 (AT) newssrv26 (DOT) news.prodigy.com...
...
....(bad) features in NetBeans?
I am trying to design a GUI, Im *almost* done, but cant find the
parameter
for setting a JFrame's initial start-up size.

I do not use net beans, but if you have
access to the _code_ [ you know, that
Java words that is your app.. Wink ],
you might try..

Component.setSize(int, int)

In addition, you should be able to use

java.awt.Toolkit.getDefaultToolkit().getScreenSize() to get the screen
resolution as a java.awt.Dimension, then use that and your GUI's height and
width to place it center screen.



Back to top
Geoffrey
Guest





PostPosted: Wed Dec 31, 2003 3:19 pm    Post subject: Re: Netbeans Help? :-) Reply with quote

You shouldn't set the size of your JFrame, it's bad practice.
Instead, you should call pack(), which uses the layoutmanagers and every
single component's preferredSize (or minimum) to determine it's size.
If you are using JTextArea or JTextfield, use constructors that set the
amount of columns.
If you are using JScrollPane's use ???, but a hack is to set the minimum and
preferred size of those manually.

After calling pack(), you might wanna use the
jFrame.set???state(SwingConstants.MAXIMIZED???).
Still call pack() first, as the user might unmaximize the window.

--
Thank you for any and all help,
Geoffrey
"Inertia_sublimation" <inertia_sublimation (AT) hotmail (DOT) com> schreef in bericht
news:zA9Gb.14556$aw2.8241229 (AT) newssrv26 (DOT) news.prodigy.com...
Quote:
Hi everyone!

I was wondering, is this the place I can request assistance with some
features in NetBeans?
I am trying to design a GUI, Im *almost* done, but cant find the parameter
for setting a JFrame's initial start-up size.

Im using the NetBeans Frame Designer tool, and on startup, I want the Main
Form to take up a certain percentage of the User's Screen space. Ive
already
gotten it to set its location to the middle of the screen
(setLocationRelativeTo(null)). I just havent found a way to imput an
initial
start-up value for the Frame in the NetBeans Frame Designer interface.

Extremely sorry if this doesnt belong here... would anyone like to tell me
where I could post a question like this if so?





Back to top
Andrew Thompson
Guest





PostPosted: Wed Dec 31, 2003 10:04 pm    Post subject: Re: Netbeans Help? :-) Reply with quote

"Geoffrey" <geoffrey (AT) nospam (DOT) invalid> wrote

Quote:
You shouldn't set the size of your JFrame, it's bad practice.
.....
Thank you for any and all help,
Geoffrey

Interesting sig. for someone
offering help, Geoffrey. ;-)



Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.