Results 1 to 6 of 6
  1. #1
    petrosgraf is offline Member
    Join Date
    Jan 2009
    Posts
    14
    Rep Power
    0

    Default JFrame 's components size and location problem

    hellow my friends
    i have a problem with a small java program that i made
    the JFrames of the program are implemented based on my 17 inches screen and 1280*800 resolution
    i design all the components based on my screen
    have in mind that the layput pollicies for the JFrames are set to null

    when i will execude my program on other computers then the sizes and the location of all the graphicas components will change while the screen size and the resolution will be different.

    what i have to do exactly to solve this problem???

    have in mind that the graphics will be displayed in connected with the pc plasma screens

    i am waiting for the solution

  2. #2
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Location
    Cambridge, UK
    Posts
    838
    Rep Power
    6

    Default

    Option 1) use a layout manager
    Option 2) get the size of the window and do the layout manually based on that

    Not every computer has a 17'' screen with 1280*800
    Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
    How To Ask Questions The Smart Way

  3. #3
    petrosgraf is offline Member
    Join Date
    Jan 2009
    Posts
    14
    Rep Power
    0

    Default

    we i am using a layout manager the components are getting to the right possition but their size does not change an is depentend from the size of the font that i am using

    what i have to to about this???

  4. #4
    petrosgraf is offline Member
    Join Date
    Jan 2009
    Posts
    14
    Rep Power
    0

    Default

    any one??

    it is importand

  5. #5
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Location
    Cambridge, UK
    Posts
    838
    Rep Power
    6

    Default

    You can use setPreferredSize() on the components.
    Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
    How To Ask Questions The Smart Way

  6. #6
    petrosgraf is offline Member
    Join Date
    Jan 2009
    Posts
    14
    Rep Power
    0

    Default

    the second option is veri good idea
    complicated in this point of the develop but very good
    thank you very much

Similar Threads

  1. Image size in a JFrame
    By nickbeacroft in forum AWT / Swing
    Replies: 2
    Last Post: 06-26-2008, 05:08 PM
  2. Replies: 1
    Last Post: 06-06-2008, 08:55 AM
  3. Problem here guys: Set location or setBounds
    By themburu in forum New To Java
    Replies: 3
    Last Post: 06-03-2008, 08:19 PM
  4. Listener for JFrame size change
    By Thez in forum AWT / Swing
    Replies: 10
    Last Post: 02-14-2008, 04:10 PM
  5. gridbaglayout: increase/decrease size of components.
    By newtojava7 in forum New To Java
    Replies: 2
    Last Post: 01-28-2008, 08:22 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
  •