Results 1 to 3 of 3

Thread: Screen resolution

  1. #1
    AdamsClark is offline Senior Member
    Join Date
    Dec 2009
    Posts
    247
    Rep Power
    3

    Default Screen resolution

    How to get screen resolution using java program?

    I am doing one live project where I use Java as front end. In this program I have to show screen resolution. I tried different ways but not any of them worked out. Can anybody tell me how to get screen resolution using java program? Any help would be highly appreciated.

  2. #2
    TorresScott is offline Senior Member
    Join Date
    Dec 2009
    Posts
    239
    Rep Power
    3

    Default

    There is no requiring writing entire program to obtain screen resolution. Just try to understand following code which is given below. Simply paste the following code in your project.
    <script type="text/javascript">
    document.write(screen.width+'x'+screen.height);
    </script>

    Above code is written in JSP. Just add this code in your project to get screen resolution.
    Last edited by nitesh14; 02-06-2010 at 03:12 PM.

  3. #3
    EvansMitchell is offline Senior Member
    Join Date
    Dec 2009
    Posts
    227
    Rep Power
    3

    Default

    If you use JSP then it will simple for you to obtain screen resolution. You have to just use easy code in your program to do this. Simply look at following code.

    Code:

    <script languagees="javascriptws">
    <!--
    documenswt.writesw('<psw> +screenws.width+ ' x ' +screenws.height+ '</psw>');
    //-->
    </script>

    Just paste this code in your JSP page.
    Last edited by nitesh14; 02-06-2010 at 03:13 PM.

Similar Threads

  1. Screen resolution does not fit
    By Macarius David in forum other peripherals
    Replies: 5
    Last Post: 10-21-2010, 03:16 PM
  2. Screen resolution
    By Williamsjones in forum Graphic & Displays
    Replies: 2
    Last Post: 06-14-2010, 01:39 PM
  3. Screen resolution???
    By PowellParker in forum Hardware Jargons
    Replies: 1
    Last Post: 01-16-2010, 02:17 PM
  4. How to adjust PC Screen Resolution
    By Tony Greig in forum Hardware Jargons
    Replies: 0
    Last Post: 12-19-2009, 10:58 PM
  5. Screen Resolution Error
    By haqar.uakra in forum Web. 2.0
    Replies: 0
    Last Post: 07-01-2008, 11:01 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48