This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Inter-Applet Communication  RSS feed

 
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
Boost this thread!