I hope we are all well. I had a great day here today. This post is my attempt to step past what seems to be a challenge in UX design concerning the area of layered panels. In Swing the main contender being: JLayeredPane.
By now I have several unsuccessful examples of making what I'd consider a simple menu and window layout with a central layered area in the main display area.
| ..... menu bar ......... |
| ... [overlayed area] ... |
| ... Function Buttons ... |
| ... Status display ..... |
In the [overlay area] I want at least two overlayed panels that cover 100% of the centre area. The background layer is a graphic (say a map) and the top layer is an annotation panel. With luck the annotation area will divide into 9 cells such that most notations will be justified to a margin. I actually had the overlay working with a JPanel layout, but the other key design elements didn't work with that choice. While the MiGLayout seems to be the correct choice for all the panels, it just belly-flops
on the JLayeredPane.
This I can deal with. All I want are some unambiguous guidelines to apply MiG Layout and JLayeredPane in the same JFrame! When you run the attached code, the two layered panels abut each other -- They don't overlay!
I don't think that's a bug. I think there's a blind spot in the MiG Layout design; MiG Layout needs to / could also support a 3-D or layered grid. I'd like that, because it would mean my (say) function button bar could overlay all 'MiG' grids. ;;-)
I accept that things aren't working in a way I'd like them to, and I want to request that some kind soul point me to some sample code or a tutorial that has something like the Frame I posted above. For me, I've run several variations on a theme -- What I want to see is a Window that looks a lot like my browser so the central area shows the biggest area (available).
I just find it frustrating when "99%" of most application windows; that includes browsers, spreadsheets and word processors optomise the centre frame. All I need to do is work with overlays. Not that big a step imho. Layers for MiG Layout seems just like a simple "Layer Extension".
What's the group challenge or agreement? .... /w