Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: floating palette windows



twall wrote:

On Wed, 31 May 2006 at 18:07:04, Ian Cheyne wrote:

JInternalFrames can be set to look like a palette on some look and
feels (including Aqua).  I have wondered whether it would be possible
to create one of these on the sly and then borrow its title bar for
my own purposes but I couldn't find a way to do that.  Does anyone
know if this is feasible.

I used this trick to try to implement floating windows under JDK1.3; start with
a window and use the JInternal frame to paint its title bar. You can override
the window's paint method, clip to the area of the internal frame's title bar,
then tell the internal frame to paint using the window's graphics object.


It looked pretty good in combination with setting the window transparent (to get
the rounded corners), but the movement response to dragging the title bar was awful.

You could also try using an undecorated JFrame containing a JInternalFrame, and every time the internal frame moves inside its parent you could relocate the outer JFrame. Its 1.4+, and would probably flicker around the edges as it moved, though.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden


This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.