Results 1 to 4 of 4
  1. #1
    farhanz2009 is offline Member
    Join Date
    Feb 2012
    Posts
    14
    Rep Power
    0

    Default How to make Jpanels and frame to fit every screen.

    I have 2 to 3 projects using GUI.. But the problem i always face is when i move my program form one pc to another with different screen size it never fit both the screens. Help will appreciated. :)

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: How to make Jpanels and frame to fit every screen.

    You need to read up on and learn to use the Java Swing layout managers as they will help you make GUI's that work well with different screen resolutions, sizes, and OS's. The tutorials can be found here.

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,457
    Blog Entries
    7
    Rep Power
    20

    Default Re: How to make Jpanels and frame to fit every screen.

    Maybe the following call can help you: Toolkit.getDefaultToolkit().getScreenSize()

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    farhanz2009 is offline Member
    Join Date
    Feb 2012
    Posts
    14
    Rep Power
    0

    Default Re: How to make Jpanels and frame to fit every screen.

    Thanks to both of you for your replies i will implement both of the above ways in my next project and will one that works the best.
    Thank you soo much.

    Happy coding. :)

Similar Threads

  1. how to set my frame in the middle of the screen
    By Alexis in forum AWT / Swing
    Replies: 4
    Last Post: 11-21-2010, 10:23 AM
  2. Replies: 1
    Last Post: 01-25-2010, 01:21 PM
  3. Full Screen Frame Resolution Problem
    By Krooger in forum AWT / Swing
    Replies: 2
    Last Post: 11-24-2009, 11:05 PM
  4. How to make an icon in bottom-right of screen
    By hunterbdb in forum AWT / Swing
    Replies: 1
    Last Post: 08-13-2009, 08:28 AM
  5. Prob. with screen resolution and Frame size??
    By SANDY_INDIA in forum AWT / Swing
    Replies: 1
    Last Post: 08-16-2008, 12:51 PM

Posting Permissions

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