CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Java Programming > Java Programming
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Java Programming Ask your Java programming question and help out others with theirs.

    Closed Thread
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old January 8th, 1999, 07:32 AM
    Werner Hutmacher Werner Hutmacher is offline
    Junior Member
     
    Join Date: Jan 1999
    Posts: 1
    Werner Hutmacher is an unknown quantity at this point (<10)
    java



    hi,


    does anybody know how to position a JFrame-Window in a java APPLICATION?

    for example:

    center the window in the middle of the screen.


    thanks in advance


    werner hutmacher
      #2    
    Old January 8th, 1999, 10:01 AM
    Zafir Anjum Zafir Anjum is offline
    Member
     
    Join Date: May 1999
    Posts: 93
    Zafir Anjum is an unknown quantity at this point (<10)
    Re: java



    //Center frame

    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();

    Dimension size = frame.getSize();

    screenSize.height = screenSize.height/2;

    screenSize.width = screenSize.width/2;

    size.height = size.height/2;

    size.width = size.width/2;

    int y = screenSize.height - size.height;

    int x = screenSize.width - size.width;

    frame.setLocation(x, y);


      #3    
    Old October 11th, 1999, 07:04 PM
    Nithyanand Nithyanand is offline
    Junior Member
     
    Join Date: Oct 1999
    Posts: 17
    Nithyanand is an unknown quantity at this point (<10)
    Re: java

    use component.setLocaton(int x, int y)

    Closed Thread

    Bookmarks
    Go Back   CodeGuru Forums > Java Programming > Java Programming


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 03:17 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009