File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes Complete Newbie needs help: hyperlink in applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Complete Newbie needs help: hyperlink in applet" Watch "Complete Newbie needs help: hyperlink in applet" New topic
Author

Complete Newbie needs help: hyperlink in applet

nev simms
Greenhorn

Joined: Sep 05, 2003
Posts: 3
I have inherited the following code which generates a scrolling applet on our site. however, i want to make the text (e.g. where i have Piece of scrolling text1 etc... in the example below) hyperlinks. If anyone can help it would be greatly appreciated.
Response.Write "<APPLET CODE=""headline.class"" CODEBASE=""_lib/java"" WIDTH=""220"" HEIGHT=""230"">" & VbCrLf
Response.Write " <PARAM NAME=""GENERAL"" VALUE=""5|FFFFFF|2|30|40|2000|0"">" & VbCrLf
Response.Write " <PARAM NAME=""LOAD"" VALUE=""000000|000000|Loading..."">" & VbCrLf
Response.Write " <PARAM NAME=""BORDER"" VALUE=""0|000000|1|1|7"">" & VbCrLf
Response.Write " <PARAM NAME=""TXT FILE"" VALUE="" |0|FFFFFF|FFFFFF|FFFFFF|2|0|8|1"">" & VbCrLf
Response.Write " <PARAM NAME=""SCROLLER"" VALUE=""3|11|11|FF0000|FFFFFF|1|0"">" & VbCrLf
Response.Write " <PARAM NAME=""0"" VALUE=""0|000000|990033|880000|2|0|11|Piece of scrolling text1| | | |0|0|12|FFFFFF|000000|000000| | |0|1| | |"">" & VbCrLf
Response.Write " <PARAM NAME=""1"" VALUE=""0|000000|990033|880000|2|0|11|Piece of scrolling text2| | | |0|0|12|FFFFFF|000000|000000| | |0|1| | |"">" & VbCrLf
Response.Write " <PARAM NAME=""2"" VALUE=""0|000000|990033|880000|2|0|11|Piece of scrolling text3| | | |0|0|12|FFFFFF|000000|000000| | |0|1| | |"">" & VbCrLf
Response.Write "</APPLET>" & VbCrLf
thanks in advance,
Nev.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Hi Nev,
Welcome to Java Ranch!
What you've shown us is the HTML page that configures the applet "headline". Unless displaying scrolling hyperlinks is a deliberately built-in feature of the applet itself (in which case, the answer depends on knowledge of how that applet is written which we don't have), the only way to do this would be to modify the Java code in the applet itself and recompile it. Do you have the file "headline.java" available?


[Jess in Action][AskingGoodQuestions]
nev simms
Greenhorn

Joined: Sep 05, 2003
Posts: 3
Hi Ernest,
Thanks for your speedy reply. i do have the file headline.class. what program would i use to edit it or is there a way i can post it on the forum for you guys to look at. given the info you have provided i think this is the applet http://appletlib.tripod.com/headline.html but im still not sure how i would add a link with text as you would normally on a HTML page i.e. <a href="target.asp">piece of text</a>. Alternatively if you are aware of a different applet that would allow me to do this i would be interested to know. grateful for any help.
Many thanks,
Nev.
nev simms
Greenhorn

Joined: Sep 05, 2003
Posts: 3
apologies, i no longer think the url in my pervious post is the applet i have.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

You can't really edit a .class file; it's the compiled form of the applet, which would have originally been in a Java source file named "headline.java". If you don't have that, then you really can't modify the applet (of course, it sounds like you're not a Java programmer, anyway.) If you don't have documentation for this applet, then there isn't much you can do at all in terms of customizing it. It might have built-in parameter documentation; try opening the HTML page with "appletviewer" from the Java Developer's Kit; then choose "Info" from the "File" menu; there may be built-in parameter documentation there.
Anyway, if you're interested in finding a different applet, then I think www.google.com is your best bet.
 
jQuery in Action, 2nd edition
 
subject: Complete Newbie needs help: hyperlink in applet