Java GUI Swing Model Explanation

前端 未结 7 1235
醉酒成梦
醉酒成梦 2021-02-01 23:31

I\'ve been working with Swing for a while now but the whole model/structure of JFrames, paint(), super, etc is all murky in my mind. I nee

7条回答
  •  孤街浪徒
    2021-02-02 00:32

    The same happened to me. Actually to this day I don't quite get 100% how all it works.

    Swing is a very flexible framework - perhaps too flexible. With flexibility comes a lot of abstraction and with abstraction comes confusion. :)

    I've found the following articles worth reading. They helped me to better understand the big picture of Swing.

    • A Swing Architecture Overview
    • The process of installing a UI delegate, which is just this image:

    They explain quite well how the model and the delegate work. It always drives me mad when I see those JLabel, LabelUI, ui.update, etc.

提交回复
热议问题