Results 1 to 2 of 2

Thread: Width of a frame

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Location
    Pennsylvania
    Posts
    133

    Width of a frame

    How do I set the width of a frame in Java(swing)?

  2. #2
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    You can use the set the size of a JFrame by setting the size property. Im pretty sure that the first arguement is width and the second is height.
    Code:
    JFrame jf = new JFrame(); 
     jf.setSize(200,300);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width