Layering Objects (That extend JComponet) on JApplet

前端 未结 2 1175
旧巷少年郎
旧巷少年郎 2020-12-21 20:41

I currently have a JApplet within which I add two objects that both extend JComponet. Object A is basically a large square and object B is a small square, I need Object B to

2条回答
  •  隐瞒了意图╮
    2020-12-21 21:01

    You might look at JLayeredPane, seen here, or OverlayLayout, seen here. Either should work in an applet, but this hybrid approach may offer additional flexibility.

    JLayeredPane

    OverlayLayout

提交回复
热议问题