Swing: Delegate events to child components of transformed parent

前端 未结 1 1494
没有蜡笔的小新
没有蜡笔的小新 2021-01-22 22:29

I\'ve got a custom component GameViewCanvas extends JPanel that will hold a number of tiles (800x800 textures). Now in GameViewCanvas I\'ve overridden the pai

1条回答
  •  南方客
    南方客 (楼主)
    2021-01-22 22:53

    Take a look at JXLayer. It does exactly what you've just asked.

    There are some excellent examples by Piet Blok, which have, unfortunately, disappeared off the net. To this end, I've made them available here.

    Take a look at the TestWrapped demo in the pbjar source. It is probably the (among) the best example.

    enter image description here

    ps - JXLayer is now officially part of Java 7, known as JLayer

    0 讨论(0)
提交回复
热议问题