Как апплетам с одной страницы взаимодействовать между собой? 7 Апрель 2009 by admin·0 Comments Апплеты на одной странице могут взаимодействовать между собой. Следующий пример это демонстрирует: import java.awt.*; public class Applet1 extends java.applet.Applet { TextField inputText; Button b; public void init() { setLayout(new FlowLayout()); inputText = new TextField( "", 15 ); b = new Button("Send to Applet 2"); add(inputText); add(b); } public boolean action(Event ev, Object arg) { if (ev.target instanceof Button) { String textMsg = inputText.getText().trim(); Applet2 applet2 = (Applet2)getAppletContext().getApplet("applet2"); if ( applet2 != null ) { applet2.AppendText( textMsg ); return true; } else return false; } return false; } апплет