This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I have a layout manager where I position each new component (JPanels containing images) in the "best fit" position. Sometimes the best fit position is rotated 90 degrees.
There's no problem setting the component's bounds to a rotated position, but how can I communicate back to the calling routine that the image must be rotated within those bounds? Is that possible?
(I'm not clear on all the advantages of LayoutManager2 over LayoutManager but as far as I can tell they don't help here.)
Joined: Feb 03, 2009
Never mind - figured it out. I subclassed JPanel to a class called Tile and added a boolean field called "rotated". Then I set rotated from the layout manager and referenced it in the container's paintComponent.
Tried to delete this post once I'd figured it out but couldn't. Sorry for the clutter.