JFrames


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: JFrames

  1. #1
    Join Date
    Sep 2002
    Posts
    15

    Question JFrames

    Can someone please tell me if there is a way to get the position of a JFrame and then set a new one? If you could tell me, I would greatly apreciate it.

    -Hatem

  2. #2
    Join Date
    Jul 2002
    Posts
    26
    the getBounds() method and the setBounds( int, int, int, int ) method.

    -gc

  3. #3
    Join Date
    Sep 2002
    Posts
    15
    Thanks for your help. Would you mind telling me what getBounds returns? and also, if you have the time, how to set it pu? I'm having a little trouble. Thanks in advanced.

    -Hatem

  4. #4
    Join Date
    Jul 2002
    Posts
    26
    setBounds( int x, int y, int width, int height )

    where x is the number of pixels from the left side of the screen; y is the number of pixels from the top of the screen; width is how wide the frame will be, and height is how tall it will be.

    getBounds()

    returns a Rectangle object. A rectangle has a x, y, width, and height attribute that relate directly to the parameters I described above.

  5. #5
    Join Date
    Aug 2002
    Posts
    10
    hello,

    just to give you this URL, it's will help you for more informations about JFrame
    http://java.sun.com/j2se/1.4.1/docs/...ng/JFrame.html

    rania +

  6. #6
    Join Date
    Sep 2002
    Posts
    15
    Thanks for the help.

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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center