Java GUI Swing Model Explanation(Java GUI Swing 模型说明)
问题描述
我已经使用 Swing 有一段时间了,但是 JFrame
s、paint()
、super
的整个模型/结构等在我脑海中都是模糊的.我需要一个清晰的解释或链接来解释整个 GUI 系统是如何组织的.
同样的事情发生在我身上.实际上,直到今天我还没有完全了解它是如何工作的.
Swing 是一个非常灵活的框架——也许太灵活了.灵活性带来了很多抽象,而抽象带来了混乱.:)
我发现以下文章值得一读.他们帮助我更好地了解 Swing 的大局.
他们很好地解释了模型和委托是如何工作的.当我看到那些 JLabel
、LabelUI
、ui.update
等时,总是让我发疯.
I've been working with Swing for a while now but the whole model/structure of JFrame
s, 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.
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.
这篇关于Java GUI Swing 模型说明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Java GUI Swing 模型说明


- 在 Java 中,如何将 String 转换为 char 或将 char 转换 2022-01-01
- GC_FOR_ALLOC 是否更“严重"?在调查内存使用情况时? 2022-01-01
- 将 Java Swing 桌面应用程序国际化的最佳实践是什么? 2022-01-01
- 获取数字的最后一位 2022-01-01
- 如何指定 CORS 的响应标头? 2022-01-01
- java.lang.IllegalStateException:Bean 名称“类别"的 BindingResult 和普通目标对象都不能用作请求属性 2022-01-01
- Eclipse 的最佳 XML 编辑器 2022-01-01
- 转换 ldap 日期 2022-01-01
- 未找到/usr/local/lib 中的库 2022-01-01
- 如何使 JFrame 背景和 JPanel 透明且仅显示图像 2022-01-01