由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Re: JPanel help!
相关主题
questions on repaint()遇到Swing的一个问题
how to paint on a Jpanel?一个基本问题。
suggestion needed for graph帮看看这个swing的小程序?
怎么控制paint?Who's online--JSP?
画多边形怎么实现?想听本版对下面这段话的点评
Java Telnet Client Implementation v0.991Betahow to update swing components
Multi-Level JInternalFrame请教BufferedImage中的setColor问题。
几个问题用java画直线的问题
相关话题的讨论汇总
话题: jpanel话题: create话题: panel话题: button话题: frame
进入Java版参与讨论
1 (共1页)
o**d
发帖数: 11
1
1 Create the frame
2 create the Panel
3 create the button
4 create an instance of listener class which implements the
ActionLister interface.
5 register the listener object to the button
6 add button to the panel
7 add the panel to the frame.
8 Make the frame show on the screen
Actually, if you have a Swing book, open the chaper of
"Event", it will have at least one sample code which is
similar to the problem you are trying to deal with.
s***i
发帖数: 186
2
override the function "paintComponent()" in JPanel.
and to repaint, just call "repaint()".
it will then call your paintComponent() to refresh view.
1 (共1页)
进入Java版参与讨论
相关主题
用java画直线的问题画多边形怎么实现?
如何在TextArea里面画位图Java Telnet Client Implementation v0.991Beta
JTextArea行间距如何设定?Multi-Level JInternalFrame
为啥画不出来?几个问题
questions on repaint()遇到Swing的一个问题
how to paint on a Jpanel?一个基本问题。
suggestion needed for graph帮看看这个swing的小程序?
怎么控制paint?Who's online--JSP?
相关话题的讨论汇总
话题: jpanel话题: create话题: panel话题: button话题: frame