I am currently working on a GUI card game in Java that uses Swing and AWT libraries. I have created custom classes that extend JPanel to fit the needs of the game, and everything seems to be working fine when I display.
However, the containment hierarchy I am using consists of nested BoxLayouts, FlowLayouts and BorderLayouts.
I am trying to create a simple animation that makes a card move on top of another, and to do that I need to be able to alter the Absolute Position of the card I want to move in order to create some sort of motion.
My question is: is there a simple automatic way to transform a JPanel that is formatted with Layout Managers to one that is identical to it but formatted using Absolute Positioning (null Layout), in order for me to be able to alter the absolute positions of the elements?
Or even better, is there a way to control the Absolute Position of a JComponent or nested JPanel EVEN IF it was inside a container that uses some Layout Manager?