Java applet question!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DragonByte
    New Member
    • Oct 2007
    • 6

    #1

    Java applet question!

    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.

    Any help you can provide would be greatly appreciated.
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    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.

    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?

    Comment

    • DragonByte
      New Member
      • Oct 2007
      • 6

      #3
      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!

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        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?

        Comment

        • DragonByte
          New Member
          • Oct 2007
          • 6

          #5
          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.

          Comment

          • r035198x
            MVP
            • Sep 2006
            • 13225

            #6
            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?

            Comment

            • DragonByte
              New Member
              • Oct 2007
              • 6

              #7
              Originally posted by r035198x
              Why don't you post the hard coded part then?
              Code:
              <applet code="NetMenu.class" 
              	align="baseline" 
              	archive="NetMenu.jar" 
              	width="230" 
              	height="150">
              <param name="bgColor" value="000000">
              <param name="topLevelColor" value="005A94">
              <param name="secondLevelColor" value="85798C">
              <param name="strColor" value="FFFFFF">
              <param name="strHiColor" value="F0C070">
              <param name="itemHeight" value="20">
              <param name="font" value="Times New Roman">
              <param name="menu0" 
                value="JavaBoutique|*|Home,Applets,Resources,|u0,u1,u2">
              <param name="u0" value="mainW|http://javaboutique.com/">
              <param name="u1" value="mainW|http://javaboutique.com/applet_index/">
              <param name="u2" value="mainW|http://javaboutique.com/resources/">
              <param name="menu1" 
                value="Applet Categories|*|,Text Effects,Navigation,Audio Effects|u4,u5,u6,u7">
              <param name="u4" value="mainW|http://javaboutique.com/cathome.html">
              <param name="u5" value="mainW|http://javaboutique.com/text/">
              <param name="u6" value="mainW|http://javaboutique.com/navigation/">
              <param name="u7" value="mainW|http://javaboutique.com/audio/">
              <param name="menu2" value="Java Resources|*|News,Tutorials|u8,u9">
              <param name="u8" value="mainW|http://javaboutique.com/news/">
              <param name="u9" value="mainW|http://javaboutique.internet.com/tutorials/">
              </applet>
              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!

              Comment

              • r035198x
                MVP
                • Sep 2006
                • 13225

                #8
                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.

                Comment

                • DragonByte
                  New Member
                  • Oct 2007
                  • 6

                  #9
                  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.

                  Comment

                  • DragonByte
                    New Member
                    • Oct 2007
                    • 6

                    #10
                    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.

                    Comment

                    Working...