Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Awesomeness

macrumors member
Original poster
Feb 12, 2009
73
0
Ok, I have a GUI in AWT and Swing, and I set the size of my JFrame, but... It includes the title bar. How do I set the size of the CONTENT of my JFrame?

Thanks beforehand,
--Awesomeness

And yes, I have figured out the size of the mac title bar. However, I want my app to be cross platform, and that means that it differs between OSes.
 

Awesomeness

macrumors member
Original poster
Feb 12, 2009
73
0
None

What exactly are you putting in the frame? what layout manager are you using?
None. I am using paint() to make graphics in a window. I have a pane inside it, but even when I set its size frame.pack() doesn't do what I want it to do.
 

iShater

macrumors 604
Aug 13, 2002
7,027
470
Chicagoland
I'm having a hard time understanding what you are trying to do, and what you are seeing instead. Care to give more details?
 

Awesomeness

macrumors member
Original poster
Feb 12, 2009
73
0
I'm having a hard time understanding what you are trying to do, and what you are seeing instead. Care to give more details?

Okay, I'm generating a box in a window using paint() and it's not coming out where I want it to be because the window, including the title bar, is in my case is 400 pixels tall, but the content of the window is only 377 pixels tall because the title bar takes up 23 of those pixels. I could make it 423 pixels tall instead, but that wouldn't work on PCs because their title bar is much taller. I need to make the content 400 pixels tall.
 

Awesomeness

macrumors member
Original poster
Feb 12, 2009
73
0
Okay, I'm generating a box in a window using paint() and it's not coming out where I want it to be because the window, including the title bar, is in my case is 400 pixels tall, but the content of the window is only 377 pixels tall because the title bar takes up 23 of those pixels. I could make it 423 pixels tall instead, but that wouldn't work on PCs because their title bar is much taller. I need to make the content 400 pixels tall.

Nevermind. I found the solution here:
http://www.acm.org/crossroads/xrds13-3/minueto.html
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.