This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Start Applet from a specific point

 
Anam Zahra
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have an applet. Its size is about 2000 x 1500 and embedded in a JSP page. When I call it in browser, horizontal and vertical scroll bars appear. It always starts from top left corner and then I go to my desired place inside the applet. I want to open it with my preferred location. May be from center or from right side. I am not talking about the applet alignment. I am talking about specific location inside the applet. Is it possible? If yes then please guide me how I can achieve? I googled it but did not find the answer. Thanks
 
Paul Clapham
Sheriff
Posts: 21955
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps you need an applet parameter, then. You can specify parameters in the HTML which loads the applet -- generate the suitable parameter value in your JSP. Then the applet can read that parameter (I expect you'd use the AppletContext to do that, I haven't checked the API documentation) and act appropriately.
 
Anam Zahra
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We set the parameters in this way

And get the value in applet like this

But I am unable to find any parameter for such type of configuration. May be somebody can help me.
 
Paul Clapham
Sheriff
Posts: 21955
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That depends on what you mean by a "parameter for such type of configuration". Perhaps you could explain your requirements, and what you need beyond that code fragment?
 
Anam Zahra
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. May be I cannot explain my problem. I am trying to resolve this issue. Then I will let you know.
 
Tony Docherty
Saloon Keeper
Posts: 3154
75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are the scroll bars you are referring to generated by the browser or the Applet?
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!