Java Jpanel Help

Associate
Joined
3 Oct 2006
Posts
2,304
Location
London
Just quickie needing a simple yay or nay please.

You know how with div's in html you have a z-index which allows you to stack a div on top a div and choose the order. Is it possible to do something similar with JPanels?

I'm trying to achieve something a bit like googlemaps but in a gui and with stars rather than road maps. I have my map in one Jpanel and my controller buttons in another jpanel and i would like to try and float that over my map.

Thanks for any responses!

Jon
 
Using a GridBagLayout items can be placed on top of each other with the last item added being 'on top', and moving down accordingly. Calls to setBackground(null); and setOpaque(false) on your higher z JPanels and job's a good 'un. There also exists an OverlayLayout, but I have no experience using this.
 
Back
Top Bottom