Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2012
    Posts
    8
    Rep Power
    0

    Default How to make java application Independant of screen resoltion..?

    Hi ,

    I developed my java applcation on pc having resultion 1366* 768.Application work fine with this resoltion but when i run same application on PC having resoltion 800*600 or different resoltion ,I got problem that application frame is not fit into display,only part of that application is display on monitor..is there any way so that application frame can fit into monitor display and work fine(means it display full screen )independant of the resolution.
    Last edited by navanathdivate; 01-12-2012 at 06:08 AM.

  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 java application Independant of screen resoltion..?

    The solution is to use layout managers "wisely". That is to let the layout managers size the components for you in a way that allows the components to be shown in their best most natural sizes. If you are not very familiar with the layout managers available, you'll want to study the layout manager tutorial in depth.

  3. #3
    Join Date
    Jan 2012
    Posts
    8
    Rep Power
    0

    Default Re: How to make java application Independant of screen resoltion..?

    can we make one class which detect the screen resoltion of the screen and accrding to that we can pass that dimensions to the Jframe and other compenents..
    rather than layout manager is any other way to do that....

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: How to make java application Independant of screen resoltion..?

    This is what LayoutManagers were designed to do.
    I mean, if you really want to reinvent the wheel...

  5. #5
    nandha is offline Member
    Join Date
    Jan 2012
    Posts
    2
    Rep Power
    0

    Default Re: How to make java application Independant of screen resoltion..?

    u can use ToolKit class an awt package. u can use the following code.

    Toolkit tk=Toolkit.getDefaultToolkit();
    int x,y;
    x=((int) tk.getScreenSize().getWidth());
    y=((int) tk.getScreenSize().getHeight());
    frame.setSize(x,y);

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,242
    Rep Power
    19

    Default Re: How to make java application Independant of screen resoltion..?

    Quote Originally Posted by nandha View Post
    u can use ToolKit class an awt package. u can use the following code.

    Toolkit tk=Toolkit.getDefaultToolkit();
    int x,y;
    x=((int) tk.getScreenSize().getWidth());
    y=((int) tk.getScreenSize().getHeight());
    frame.setSize(x,y);
    A bad 'solution' to a misinterpretation of the issue at hand. Ever come across setExtendedState(MAXIMIZED_BOTH) ? But that's not the issue here.

    Oh, and when posting on a technical forum, please Write in clear, grammatical, correctly-spelled language.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. how to make screen locker in java??
    By javasabin in forum AWT / Swing
    Replies: 2
    Last Post: 12-27-2010, 08:50 PM
  2. How can i make my java application installable
    By buston01 in forum Advanced Java
    Replies: 2
    Last Post: 12-10-2010, 01:32 PM
  3. Replies: 11
    Last Post: 06-01-2010, 10:34 PM
  4. Replies: 1
    Last Post: 01-25-2010, 01:21 PM
  5. Device Independant
    By shajuantony in forum AWT / Swing
    Replies: 2
    Last Post: 05-25-2009, 10:15 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
  •