没有你说的情况呀,再试试吧import java.awt.*;
import javax.swing.*;/**
* <applet code="Test.class" width=200 height=200>
* </applet>
*/
class A
{
public void modify(JTextPane text)
{
text.setText("Modified by A");
}
}public class Test extends JApplet
{
public void init()
{
A a=new A();
JTextPane text=new JTextPane();
getContentPane().add(text);
a.modify(text);
}
}
import javax.swing.*;/**
* <applet code="Test.class" width=200 height=200>
* </applet>
*/
class A
{
public void modify(JTextPane text)
{
text.setText("Modified by A");
}
}public class Test extends JApplet
{
public void init()
{
A a=new A();
JTextPane text=new JTextPane();
getContentPane().add(text);
a.modify(text);
}
}
import javax.swing.*;/**
* <applet code="Test.class" width=200 height=200>
* </applet>
*/
class A
{
public void modify(JTextPane text)
{
text.setText("Modified by A");
}
}public class Test extends JApplet
{
public void init()
{
A a=new A();
JTextPane text=new JTextPane();
getContentPane().add(text);
a.modify(text);
}
}