[求助]Swing_Frame_Panel的问题
我新建了两个Frame.一个名为FrameFirst.一个名为FrameTwo。我在FrameFirst中插入了些文本框,文本域,标签等,能不能把FrameFirst中的文本框、文本域的内容显示在FrameTwo中的文本域中显示.
怎么实现啊?
在线等。。。。
虽两个Frame都在一个工程中,不过是独立的
这个我试过了呀.
我想应该在FrameTwo.java 中
new FrameFirst();
不过接下来怎么做呢?
我在鼠标点击事件里这么写的:
FrameFirst frFrist = new FrameFirst();
frFrist.getContentPane();
frFrist.getComponents();
txaInfo.setText(frFrist.txtName.getText() + frFrist.txtAge.getText() + frFrist.txtUy.getText() );
依然不能获得FrameFirst中文本框中的内容。
我在鼠标点击事件里这么写的:
FrameFirst frFrist = new FrameFirst();
frFrist.getContentPane();
frFrist.getComponents();
txaInfo.setText(frFrist.txtName.getText() + frFrist.txtAge.getText() + frFrist.txtUy.getText() );
依然不能获得FrameFirst中文本框中的内容。
告诉我怎么实现呀~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!