- Sep 29, 2004
- 18,656
- 67
- 91
Within Unix, Windows XP and Widnows 2000, the title bars of JFrame(JWindow, etc) can be different sizes. They can even be set within an OS to a custom size.
So, in Java, how can I get the size of a title bar? I need this for a JFrame, but the same function call or calls should also work on Window objects, JDialogs, etc.
Anyone out htere know the answer?
Of course, I could get the contentpane size and Window size and do subtraction. Even then, there might be issues with the borders of a JFRame causing the numbers not to work out. I've done this before, but I forget what calls need to be made.
I was wondering if there was one call I could make to get this information.
So, in Java, how can I get the size of a title bar? I need this for a JFrame, but the same function call or calls should also work on Window objects, JDialogs, etc.
Anyone out htere know the answer?
Of course, I could get the contentpane size and Window size and do subtraction. Even then, there might be issues with the borders of a JFRame causing the numbers not to work out. I've done this before, but I forget what calls need to be made.
I was wondering if there was one call I could make to get this information.