由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - question about repaint, update and paint
相关主题
怎么控制paint?有没有办法批处理一个TreeModel的改变?
用第三方的package,出bug一般大家怎么解决?如何让Swing对象即使更新?
这个Swing的Exception是怎么产生的?eclipse 怪问题
Top Ten Errors Java Programmers Make(9)questions on repaint()
有没有类似MS Visual Studio的Java IDE?how to update swing components
Intellij Idea gui not pure Swing?override/overload/overwrite in Java
java 响应速度问题第十章 编程实例
输入中文导致的死 机Re: FileDialog 的问题
相关话题的讨论汇总
话题: repaint话题: paint话题: update话题: calls话题: question
进入Java版参与讨论
1 (共1页)
p*******y
发帖数: 133
1
I am confused what is the relationship between these three.
it seems most of the time, repaint() calls update(), and update()
calls paint().
but sometime we override update() and put all the code for
painting there, without overriding paint(), the graphics just
wouldn't be painted.
I checked the java API for the repaint() description. it seems
sometimes it calls paint() directly, but only when the component
is lightweighted. In all my GUI, i just used AWT, would that
be a problem, i mean maybe t
KG
发帖数: 515
2
You can read this article to get a better picture of the differences.
http://java.sun.com/products/jfc/tsc/articles/painting/index.html

【在 p*******y 的大作中提到】
: I am confused what is the relationship between these three.
: it seems most of the time, repaint() calls update(), and update()
: calls paint().
: but sometime we override update() and put all the code for
: painting there, without overriding paint(), the graphics just
: wouldn't be painted.
: I checked the java API for the repaint() description. it seems
: sometimes it calls paint() directly, but only when the component
: is lightweighted. In all my GUI, i just used AWT, would that
: be a problem, i mean maybe t

1 (共1页)
进入Java版参与讨论
相关主题
Re: FileDialog 的问题有没有类似MS Visual Studio的Java IDE?
Re: AWT 和 SWING 在程序应用中有什么区别?Intellij Idea gui not pure Swing?
Re: AWT和SWING到底有什么不同?java 响应速度问题
How about Swing?输入中文导致的死 机
怎么控制paint?有没有办法批处理一个TreeModel的改变?
用第三方的package,出bug一般大家怎么解决?如何让Swing对象即使更新?
这个Swing的Exception是怎么产生的?eclipse 怪问题
Top Ten Errors Java Programmers Make(9)questions on repaint()
相关话题的讨论汇总
话题: repaint话题: paint话题: update话题: calls话题: question