Page 1 of 2 12 LastLast
Results 1 to 20 of 32
  1. #1
    hervey is offline Member
    Join Date
    Oct 2008
    Posts
    24
    Rep Power
    0

    Default Make java applet a button

    I don't know if this is an HTML question or a Java one but am going with Java. I have the following applet and would like to make it a click able button but don't know how. I would like it to be one of those that goes to an anchor in a webpage e.g. "<a href="#top"></a>"

    h t t p : / / lovelago.googlepages [dot] com/java_button_eg [dot] html


    Can I do this?


    Thanks.

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Seems to me, it's not a button, it's a label. With a click event draw a circle on it.

    Can you explain what you want to do? On click of a button you want to open a web page?

  3. #3
    hervey is offline Member
    Join Date
    Oct 2008
    Posts
    24
    Rep Power
    0

    Default

    Thanks for replying, I would like to click it with my mouse and it go to an anchor in my page.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  5. #5
    hervey is offline Member
    Join Date
    Oct 2008
    Posts
    24
    Rep Power
    0

    Default what's wrong with what I have now

    Look I just compiled the program I had and it outputted this java stuff, so if its from program it cant be wrong. Now I've got this working on my site, do I have to do something completely different from what I am?

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  7. #7
    hervey is offline Member
    Join Date
    Oct 2008
    Posts
    24
    Rep Power
    0

    Default

    I did give my web address, I cant post code because I am a new user and there are restrictions. Otherwise I would
    Last edited by hervey; 10-28-2008 at 10:20 AM. Reason: +t

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  9. #9
    hervey is offline Member
    Join Date
    Oct 2008
    Posts
    24
    Rep Power
    0

    Default code mio

    I'm telling you it wont let me, I tried the html, php and just pasting code and it comes back that I need 20 posts to do this.


    If you go to the website you can see the code:


    h t t p : / / lovelago.googlepages [dot] com/java_button_eg [dot] html



    Thanks.

  10. #10
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  11. #11
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default

    Are you able to have the applet go to an anchor in its webpage?
    Just hardcoded, without any user interaction?
    The GUI bit should be easy to add.

  12. #12
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    To post code, simply paste your code into the forum editor. We do request though that you use code tags to help your code retain its formatting and remain readable.

    To do this, you will need to paste already formatted code into the forum, highlight this code, and then press the "code" button at the top of the forum Message editor prior to posting the message. Another way is to place the tag &#91;code] at the top of your block of code and the tag &#91;/code] at the bottom, like so:

    Java Code:
    &#91;code]
      // your code block goes here.
      // note the differences between the tag at the top vs the bottom.
    &#91;/code]

  13. #13
    hervey is offline Member
    Join Date
    Oct 2008
    Posts
    24
    Rep Power
    0

    Default my code

    "To be able to post links or images your post count must be 20 or greater. You currently have 5 posts.
    Please remove links from your message, then you will be able to submit your post."

    Even with this code tags it will not let me, I hate those kids of restrictions, why 20 posts, its too much. You can go to the webpage and see the code, you could post it then I suppose, because I can't.


    Norm: No I cannot click the java applet, I can't even get a right click in Safari, but can in FireFox

  14. #14
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by hervey View Post
    Even with this code tags it will not let me, I hate those kids of restrictions, why 20 posts, its too much. You can go to the webpage and see the code, you could post it then I suppose, because I can't.
    Actually those kind of restrictions are must to protect our community from spammers. You may know that, lots of members looking to advertising different things through such communities. Actually they are doing lots of things. So what we need here is, make sure that he/she going to stick with us for a long time. Once you exceed the number of total posts 20, we realize that you are one of our key members in the Java Forums. :)

  15. #15
    hervey is offline Member
    Join Date
    Oct 2008
    Posts
    24
    Rep Power
    0

    Default keep this thread alive.. I'll get there

    Kind words, I feel valued now. But I'd sooner have this java headache licked, I don't suppose you've seen the code I have?

    Thanks.

  16. #16
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default

    No I cannot click the java applet, I can't even get a right click in Safari, but can in FireFox
    That was to be the second part of the project, getting the GUI to work.
    I was asking: Are you able to have the applet go to an anchor in its webpage?
    Just hardcoded, without any user interaction?

  17. #17
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by hervey View Post
    Kind words, I feel valued now. But I'd sooner have this java headache licked, I don't suppose you've seen the code I have?

    Thanks.
    I haven't see your code. If you can it's better to post here.

  18. #18
    hervey is offline Member
    Join Date
    Oct 2008
    Posts
    24
    Rep Power
    0

    Default G&B

    Alright then, I'll achieve 20 posts. But I'll have to slightly stray off topic. So, lets see its 1:52 GMT and half an hour ago I got up, I went to the kitchen and our silly wasteful landlord threw away so much stuff that could be recycled. Including almost whole bars of green and blacks chocolate, about 8-9 worth, he's a fruitcake.

  19. #19
    hervey is offline Member
    Join Date
    Oct 2008
    Posts
    24
    Rep Power
    0

    Default

    You know what I did, I saved the chocolate, it was still in its wrapper. Now I have loads of perfectly good chocolate, our composting quota is off the scale and paper/foil/glass are all plentiful.

  20. #20
    hervey is offline Member
    Join Date
    Oct 2008
    Posts
    24
    Rep Power
    0

    Default 10 = half

    This will be my 10th post, half way. I must wnt this problem sorted if I'm going to find another 10 ways of reaching the threshold to post code. Surely this restriction is due for revision, another forum I was on stood their minimum at 5 posts, nothing compared to here.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 07-01-2008, 09:06 PM
  2. java applet button problem .. :( plz help!
    By i4gotmyid in forum Java Applets
    Replies: 1
    Last Post: 04-17-2008, 04:11 PM
  3. java applet button problem .. :( plz help
    By i4gotmyid in forum New To Java
    Replies: 0
    Last Post: 04-05-2008, 09:55 AM
  4. search button java applet awt
    By perplexingtrax in forum New To Java
    Replies: 2
    Last Post: 03-24-2008, 01:49 PM
  5. applet button
    By kazitula in forum Java Applets
    Replies: 2
    Last Post: 11-14-2007, 07:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •