This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund 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.)
Thanks...
- Dan
Dan Falcone
Greenhorn
Joined: Feb 03, 2009
Posts: 8
posted
0
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.