aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes GUI Stuff Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "GUI Stuff" Watch "GUI Stuff" New topic
Author

GUI Stuff

Stuart Geipel
Greenhorn

Joined: Jun 27, 2009
Posts: 10
I'm developing a mac application in Java that will record video. Although you might say this belongs in the mac forum, all but one of my problems (#4) are for PC and Mac, so since there are more people here, I thought I'd get better answers. If 1 through 3 get answered this should be moved to the mac area.

1. A year ago when I first started using painting in awt, I had problems where the title bar was included in the JFrame size. After what seemed like hours of searching I finally found http://www.acm.org/crossroads/xrds13-3/minueto.html, which saved me. However, I don't want to have a canvas in there because I don't need to paint anything. Plus, the canvas solution won't work because it relies on pack() to work, and I'm going to be resizing all over the place.

My first idea for a solution would be to figure out the offset created by the current look and feel on each side and use that to find the real size of my window, but I have no idea how to do that.

2. When I finally find a recording solution, how the user interface will work is that when you record, the box you have below the title bar will be the area that is going to be recorded. However, I need the title bar offset to calculate where the box below really is.

3. This isn't extremely important, but I'd really like to have a live resize listener; that is instead of the title bar showing the new size once I let go of the mouse, which I have now, it would update the title bar every pixel of change that happens, so it saves users a lot of clicks when they want to make the recording window a certain size.

4. This isn't super important either, but when I hide my window the menu bar disappears. Apparently apple.laf.useScreenMenuBar only makes the menu bar move to the top when the menu bar is visible. I'd like to be able to hide my window and re-open it whenever I want, because eventually I'll figure out how to make it so that it always stays in front, even when it doesn't have focus.

I'm sorry that I need so much help... =(
Stuart Geipel
Greenhorn

Joined: Jun 27, 2009
Posts: 10
Help! I've found the Container.getInsets() method, but whenever I use it I just get 0 for everything!
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

Moving to our GUI forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> My first idea for a solution would be to figure out the offset created by the current look and feel on each side
> and use that to find the real size of my window, but I have no idea how to do that.

something like this perhaps

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GUI Stuff
 
Similar Threads
Mac menu bar
Components and Containers : My Notes
Mac newbie
best one liners
how to make my jtextfield smaller ?