DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2004
    Posts
    11

    Question not able to set JFrame size , developing using Eclipse

    Hi,
    I hope some one can tell me what i am doing wrong

    here is what i am doing

    i am getting the screen size, using the defaultToolkit,

    and setting my JFrame size to the same size as that returned by that method(defaulttoolkit.getscreensize)

    but my frame takes on a fixed size that is very small

    i changed its size to double the screen size, but still it had the same original size,

    i need help urgetnly please!!!

    I am using Eclipse IDE. and i not at all familiar with it either!!!!
    Please i would really appreciate someones help!!!!!!!!!!!!
    ssary

  2. #2
    Join Date
    Oct 2004
    Posts
    311
    Where are you setting the screensize?
    Cause I had a similar problem when developing in NetBeans, so I have overridden the setVisible method and put it in there.

    Code:
    public void setVisible(boolean state)
    {
      this.setScreenSize();
      super(state);
    }
    This solved the problem for me.

  3. #3
    Join Date
    Oct 2004
    Posts
    11
    Hi,
    thanks for ur reply
    i did that but still it keeps showing the frame at a small size,
    i have overridden the set visible method and written teh screen size, but still the same thing happens
    ssary

  4. #4
    Join Date
    Oct 2004
    Posts
    311
    and this is a problem when runnign the application or when working with it in Eclipse itself?

  5. #5
    Join Date
    Oct 2004
    Posts
    11
    That is what i dont know,
    becasue i have developed swing applcations before and never had this problem,

    is there something in eclipse that causes this to happen??

    if i create a panel and add it to the frame and set the preferered size for the panel then it is showing at the size that i give,

    but if i set the size for the frame it is not reflected at runtime!!!!
    ssary

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links