Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

java screen resolution

  • 05-02-2002 06:03PM
    #1
    Closed Accounts Posts: 8,478 ✭✭✭


    problem :

    when i run my java app at the current screen res [1024*768], all is fine
    when i run it at say, 800*600, buttons/fields etc get chopped off !! the screen looses some parts and generally looks crap

    question :

    how can i creat the application so that i changes dynamically as per the screen size ? will i need to start again with a JPanel and JScrollPane for all the conent on screen ?

    can the prog not change the screen res by itself when it starts and back to default when it exits ?

    HELP


Comments

  • Closed Accounts Posts: 1,295 ✭✭✭Meh


    Originally posted by Gone Shootin
    how can i creat the application so that i changes dynamically as per the screen size ? will i need to start again with a JPanel and JScrollPane for all the conent on screen ?
    GridBagLayout will resize your buttons/textfields etc automatically when you change the window size. I don't know if it picks up when the screen res changes, but it's worth a try.
    can the prog not change the screen res by itself when it starts and back to default when it exits ?
    Yes. Using JNI to call windows API function ChangeDisplaySettings.


  • Closed Accounts Posts: 8,478 ✭✭✭GoneShootin


    ive tried gridbaglayout, fine on the res that i designed it on, but otherwise it fails with same results

    this JNI, are there any good resources on that ? sun obviously, but for the newcomer ? would i have to design the entire program using JNI ?


  • Closed Accounts Posts: 1,295 ✭✭✭Meh


    http://www.google.com/search?q=jni%20tutorial
    You won't have to do the whole program using JNI; just the call to ChangeDisplaySettings.


Advertisement