Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

java screen resolution

Options
  • 05-02-2002 6: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