Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / January 2004

Tip: Looking for answers? Try searching our database.

Help:  JFrame setSize not working???

Thread view: 
lcan - 19 Jan 2004 04:53 GMT
Hi I am using Windows 2K with JDK 1.4.2. My class extends from JFrame but
the statement:

 setsize(500, 300)

does not seem to have any effect. the following doesn't work either:

 getContentPane().setsize(500, 300)

What may be wrong?

Thanks!!
--lc
Ryan Stewart - 19 Jan 2004 13:21 GMT
> Hi I am using Windows 2K with JDK 1.4.2. My class extends from JFrame but
> the statement:
[quoted text clipped - 6 lines]
>
> What may be wrong?

What result may you be expecting? What result may you be getting?
lcan - 20 Jan 2004 06:07 GMT
Thanks for the reply.

I want to set the main window to a certain size. I believe
setsize was for that purpose.

I added a left and right JTextArea to the JFrame, which has
been set to a GridLayout(1,1).

Please help. Thanks.

Regards,
Patrick

> > Hi I am using Windows 2K with JDK 1.4.2. My class extends from JFrame but
> > the statement:
[quoted text clipped - 8 lines]
>
> What result may you be expecting? What result may you be getting?
Andrew Thompson - 20 Jan 2004 11:02 GMT
| > > Hi I am using Windows 2K with JDK 1.4.2. My class extends from JFrame
| but
[quoted text clipped - 7 lines]
| > >
| > > What may be wrong?
..
| I want to set the main window to a certain size. I believe
| setsize was for that purpose.

Please do not top-post. It makes the
thread difficult to follow.

Your answers might be found
by having a look over this..
http://java.sun.com/docs/books/tutorial/uiswing/layout/problems.h
tml

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
W. - 21 Jan 2004 08:21 GMT
> Hi I am using Windows 2K with JDK 1.4.2. My class extends from JFrame but
> the statement:
[quoted text clipped - 6 lines]
>
> What may be wrong?

Are you using pack() on the JFrame? If so then the LayoutManager
determins the window size ignoring setSize.

Signature

Regards,
W.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.