Results 1 to 2 of 2
  1. #1
    Borneq is offline Member
    Join Date
    Jan 2010
    Posts
    8
    Rep Power
    0

    Default How to set size of window content?

    I want write calculator with windows contenct size 320x480.
    CalcGui frame = new CalcGui();
    calc.setSize(320, 480); <---- size whole window with title and bound
    alternatively
    frame.setPreferredSize(new Dimension(320, 480));
    frame.pack();

    frame.getContentPane().setPreferredSize(new Dimension(320, 480))
    ?

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,701
    Rep Power
    8

    Default Re: How to set size of window content?

    Look into the following: borders, insets, and margins.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Window size increase animation
    By eLancaster in forum New To Java
    Replies: 3
    Last Post: 04-07-2011, 06:57 PM
  2. how to restrict the size of the window in swt
    By chakribobby in forum SWT / JFace
    Replies: 2
    Last Post: 06-09-2010, 03:31 PM
  3. Replies: 22
    Last Post: 05-19-2010, 02:00 PM
  4. run last class in full size window
    By sonny in forum Eclipse
    Replies: 0
    Last Post: 03-05-2010, 02:56 PM
  5. Replies: 1
    Last Post: 06-06-2008, 07:55 AM

Posting Permissions

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