Java GUI Swing模型说明 [英] Java GUI Swing Model Explanation

查看:104
本文介绍了Java GUI Swing模型说明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经和Swing合作了一段时间,但是JFrame s,paint()super等的整个模型/结构在我脑海中都是模糊的. 我需要一个清晰的解释或链接来解释整个GUI系统的组织方式.

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 need a clear explanation or link that will explain how the whole GUI system is organized.

推荐答案

我也遇到了同样的情况.实际上,到目前为止,我还不太了解它是如何工作的100%.

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

Swing是一个非常灵活的框架-也许太灵活了.灵活性带来了很多抽象,而抽象带来了混乱. :)

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

我发现以下文章值得一读.他们帮助我更好地了解了Swing的概况.

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:

他们很好地解释了模型和委托人的工作方式.当我看到那些JLabelLabelUIui.update等时,总是让我发疯.

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.

这篇关于Java GUI Swing模型说明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆