 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Inertia_sublimation Guest
|
Posted: Wed Dec 24, 2003 5:35 am Post subject: Netbeans Help? :-) |
|
|
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
|
Posted: Wed Dec 24, 2003 12:17 pm Post subject: Re: Netbeans Help? :-) |
|
|
"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.. ],
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
|
Posted: Wed Dec 24, 2003 12:54 pm Post subject: Re: Netbeans Help? :-) |
|
|
"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.. ],
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
|
Posted: Wed Dec 31, 2003 3:19 pm Post subject: Re: Netbeans Help? :-) |
|
|
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
|
Posted: Wed Dec 31, 2003 10:04 pm Post subject: Re: Netbeans Help? :-) |
|
|
"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 |
|
 |
|
|
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
|
|