由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - how to update swing components
相关主题
questions on repaint()Re: Question: OutOfMemoryError when draw
@goodbug: Wicket vs JSF一个基本问题。
Re: JPanel help! 请问一个用Java设计简单动画(2D)的问题
Re: Swing问题Java Swing -- autohide panel widgets?
paint()呀,repaint()呀有没有办法批处理一个TreeModel的改变?
农民运动讲习所1. Thread and paint()帮看看这个swing的小程序?
question about repaint, update and paint用第三方的package,出bug一般大家怎么解决?
怎么控制paint?Java Paint()可以被中断吗?
相关话题的讨论汇总
话题: update话题: components话题: swing话题: when话题: component
进入Java版参与讨论
1 (共1页)
w********r
发帖数: 5
1
When a function is running, the frame seems dead. It won't be repainted even
if it is only moved. If modify some text in the component, it won't update it.
How to make it work? I want to show something when the algorithm is running. I
tried "validate", "update", "repaint". None of them works. Maybe I didn't call
them in the correct way. Nothing need to do when using awt components. The
component will be updated whenever it is modified. Anything special with
swing?
Thank you very much
f********h
发帖数: 149
2
remeber java vm does the swing related sutff in a separate thread, so if you
invoke method like update,repaint in your computational-expensive thread, you
will never see any update immediately.
Look at Timer class. It will help you.

【在 w********r 的大作中提到】
: When a function is running, the frame seems dead. It won't be repainted even
: if it is only moved. If modify some text in the component, it won't update it.
: How to make it work? I want to show something when the algorithm is running. I
: tried "validate", "update", "repaint". None of them works. Maybe I didn't call
: them in the correct way. Nothing need to do when using awt components. The
: component will be updated whenever it is modified. Anything special with
: swing?
: Thank you very much

1 (共1页)
进入Java版参与讨论
相关主题
Java Paint()可以被中断吗?paint()呀,repaint()呀
输入中文导致的死 机农民运动讲习所1. Thread and paint()
如何让Swing对象即使更新?question about repaint, update and paint
java graphics2d 画图请教怎么控制paint?
questions on repaint()Re: Question: OutOfMemoryError when draw
@goodbug: Wicket vs JSF一个基本问题。
Re: JPanel help! 请问一个用Java设计简单动画(2D)的问题
Re: Swing问题Java Swing -- autohide panel widgets?
相关话题的讨论汇总
话题: update话题: components话题: swing话题: when话题: component