Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inter-Applet Communication

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created two applet .
I am trying to draw a line from first applet to the second.
by following code:-
Applet oa;
oa= getAppletContext().getApplet("myapplet1");

if(oa != null){

int x=oa.size().width;
int y=oa.size().height;
Graphics g=oa.getGraphics();
g.setColor(Color.red);
g.drawLine(0,0,x,y);
}
else{System.out.println("OKOKOKOK");}
*My Problem is my context is not retriving(i.e oa=null is comming) what will be the problem?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic