由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Re: How to let two JFrame contact each other?
相关主题
Re: JTextArea的内容不滚动[合集] a question about data structure
Can't figure out: why can't append again急问如何append double 数据到txt文件
Re: help with JTextArea文件分割的问题
How to append something on a file?帮我了解一下64bit JVM
How to delete an entry in JAR?请问StringBuffer的OutofMemory问题
GURU NEEDED: eDirectory and CA-ACF2想请教一下银行的核心交易系统的实现
how to edit autoexec.bat我自己编了个Java面试题
求教 java.lang.outofMemory现在感觉到为什么大家说mongo有很多问题了
相关话题的讨论汇总
话题: textframe话题: jframe话题: mainframe话题: public
进入Java版参与讨论
1 (共1页)
i*****e
发帖数: 2810
1

It is simple. You can do it in many ways.
One way to do it is to pass your mainFrame to the event listener of
your Jbutton. Like this,
MyActionListener myactionhandler = new MyActionListener(mainFrame);
....
class MyActionListener extends ActionListener {
private textFrame;
public MyActionListener(JFrame f) {
textFrame = f;
}
public void actionPerformed(ActionEvent evt) {
//append text to textFrame here
}
1 (共1页)
进入Java版参与讨论
相关主题
现在感觉到为什么大家说mongo有很多问题了How to delete an entry in JAR?
对于Senior Java developer,哪些方面的能力是比较重要的?GURU NEEDED: eDirectory and CA-ACF2
问个Struts的问题how to edit autoexec.bat
Re: component之间怎样送消息?求教 java.lang.outofMemory
Re: JTextArea的内容不滚动[合集] a question about data structure
Can't figure out: why can't append again急问如何append double 数据到txt文件
Re: help with JTextArea文件分割的问题
How to append something on a file?帮我了解一下64bit JVM
相关话题的讨论汇总
话题: textframe话题: jframe话题: mainframe话题: public