Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Java Frame.setSize()

  • 15-05-2001 10:47PM
    #1
    Closed Accounts Posts: 286 ✭✭


    I've got a java app with a frame which is setSize( 500, 500 ) in the main method. when i load it its not the full size, i lose 8 pixels in width and 27 in height, is this normal, are they allocated for the border and title bar ?
    If so its really annoying.

    Thanks

    Mr. Chuffy


Comments

  • Registered Users, Registered Users 2 Posts: 2,281 ✭✭✭DeadBankClerk


    app?

    applet?

    if its an applet and u are using applet viewer it does rob some pixels from you, but in html it works fine.

    dont know about applications tho.


  • Closed Accounts Posts: 286 ✭✭Kev


    Its actually both, my main class extends Applet but includes a main() method which instanciates an object of itself so it can be run as an application or as an applet.
    i was running it as an application when it was robbing me pixels.


  • Closed Accounts Posts: 345 ✭✭harVee


    Have you got the pack(); command in your main method. If so take it out. It might make a difference (then again it might not).


  • Closed Accounts Posts: 286 ✭✭Kev


    No theres no pack call.


Advertisement
Advertisement