Connecting Tech Pros Worldwide Forums | Help | Site Map

Java applet question!

Newbie
 
Join Date: Oct 2007
Posts: 6
#1: Oct 25 '07
This is probably a really easy fix for anyone with any Java experience. Since I have none I am here asking for your help. I have downloaded a Java menu from the web to use on a page I am creating for a friend. I have the menu working fine but the problem I want to fix is that I have to hard code the parameters for the links into each page. Is there a way to put all the link information into one external file that is called by each page so I can make menu edits in just the one location? The menu I downloaded is called NetMenu and can be found here.
http://javaboutique.internet.com/NetMenu/
Any help you can provide would be greatly appreciated.



Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#2: Oct 25 '07

re: Java applet question!


Quote:

Originally Posted by DragonByte

This is probably a really easy fix for anyone with any Java experience. Since I have none I am here asking for your help. I have downloaded a Java menu from the web to use on a page I am creating for a friend. I have the menu working fine but the problem I want to fix is that I have to hard code the parameters for the links into each page. Is there a way to put all the link information into one external file that is called by each page so I can make menu edits in just the one location? The menu I downloaded is called NetMenu and can be found here.
http://javaboutique.internet.com/NetMenu/
Any help you can provide would be greatly appreciated.

1.) Don't use a title like "I need your help". Every one who posts here needs help.
2.) What is a Java menu? What kind of pages are you talking about? JSP pages
3.) Are you sure you don't need Javascript help instead of Java help?
Newbie
 
Join Date: Oct 2007
Posts: 6
#3: Oct 25 '07

re: Java applet question!


Quote:

Originally Posted by r035198x

1.) Don't use a title like "I need your help". Every one who posts here needs help.
2.) What is a Java menu? What kind of pages are you talking about? JSP pages
3.) Are you sure you don't need Javascript help instead of Java help?

1.) Sorry about that!
2.) Java applet vertical pulldown menu, complete with mouseovers and sound effects for an HTML page.
3.) I am not sure what kind of help I need, I just know I need help.

Thanks!
Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#4: Oct 25 '07

re: Java applet question!


Quote:

Originally Posted by DragonByte

1.) Sorry about that!
2.) Java applet vertical pulldown menu, complete with mouseovers and sound effects for an HTML page.
3.) I am not sure what kind of help I need, I just know I need help.

Thanks!

4.) Are you allowed to change the code for the menus?
5.) Do you know where in the code the values are hardcoded?
Newbie
 
Join Date: Oct 2007
Posts: 6
#5: Oct 25 '07

re: Java applet question!


Quote:

Originally Posted by r035198x

4.) Are you allowed to change the code for the menus?
5.) Do you know where in the code the values are hardcoded?

4.) & 5.) Yes the code is fully customizable and I have made several changes during testing.
Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#6: Oct 26 '07

re: Java applet question!


Quote:

Originally Posted by DragonByte

4.) & 5.) Yes the code is fully customizable and I have made several changes during testing.

Why don't you post the hard coded part then?
Newbie
 
Join Date: Oct 2007
Posts: 6
#7: Oct 26 '07

re: Java applet question!


Quote:

Originally Posted by r035198x

Why don't you post the hard coded part then?

Expand|Select|Wrap|Line Numbers
  1. <applet code="NetMenu.class" 
  2.     align="baseline" 
  3.     archive="NetMenu.jar" 
  4.     width="230" 
  5.     height="150">
  6. <param name="bgColor" value="000000">
  7. <param name="topLevelColor" value="005A94">
  8. <param name="secondLevelColor" value="85798C">
  9. <param name="strColor" value="FFFFFF">
  10. <param name="strHiColor" value="F0C070">
  11. <param name="itemHeight" value="20">
  12. <param name="font" value="Times New Roman">
  13. <param name="menu0" 
  14.   value="JavaBoutique|*|Home,Applets,Resources,|u0,u1,u2">
  15. <param name="u0" value="mainW|http://javaboutique.com/">
  16. <param name="u1" value="mainW|http://javaboutique.com/applet_index/">
  17. <param name="u2" value="mainW|http://javaboutique.com/resources/">
  18. <param name="menu1" 
  19.   value="Applet Categories|*|,Text Effects,Navigation,Audio Effects|u4,u5,u6,u7">
  20. <param name="u4" value="mainW|http://javaboutique.com/cathome.html">
  21. <param name="u5" value="mainW|http://javaboutique.com/text/">
  22. <param name="u6" value="mainW|http://javaboutique.com/navigation/">
  23. <param name="u7" value="mainW|http://javaboutique.com/audio/">
  24. <param name="menu2" value="Java Resources|*|News,Tutorials|u8,u9">
  25. <param name="u8" value="mainW|http://javaboutique.com/news/">
  26. <param name="u9" value="mainW|http://javaboutique.internet.com/tutorials/">
  27. </applet>
  28.  
This is a sample of the code that I am putting into each html page. As you can see, params "u0" - "u9" are the links. I want to have those located in an external file so menu edits are centralized.

Thanks!
Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#8: Oct 26 '07

re: Java applet question!


Since those are simply the applet parameters, you can go into the code for the applet and change the code so that it doesn't use those parameters but reads the values from a text file instead. You can google "read text file using applets" to find out all the settings you need to have for the file reading part to work.
Newbie
 
Join Date: Oct 2007
Posts: 6
#9: Oct 26 '07

re: Java applet question!


Quote:

Originally Posted by r035198x

Since those are simply the applet parameters, you can go into the code for the applet and change the code so that it doesn't use those parameters but reads the values from a text file instead. You can google "read text file using applets" to find out all the settings you need to have for the file reading part to work.

Thanks, I will give that a try and report back here with teh results. I appreciate all the help.
Newbie
 
Join Date: Oct 2007
Posts: 6
#10: Oct 26 '07

re: Java applet question!


Quote:

Originally Posted by r035198x

Since those are simply the applet parameters, you can go into the code for the applet and change the code so that it doesn't use those parameters but reads the values from a text file instead. You can google "read text file using applets" to find out all the settings you need to have for the file reading part to work.

I did a search and did quite a bit of reading. Didn't understand most of it and fear that this solution is not going to help me out. I went through the .class file and can't figure out any way to modify it to get my desired results. Like I said in my original post, I have no Java experience so most of this looks foreign to me. I was hoping it would be as easy as putting the applet code into a .js file and just calling that from the html pages, but I guess that is my inexperience talking. I would be willing to try any other ideas anyone may have. Thanks again.
Reply