Results 1 to 11 of 11
  1. #1
    goku4eternity is offline Member
    Join Date
    Dec 2010
    Posts
    12
    Rep Power
    0

    Exclamation How do I put these two java files on a website?

    How do I put these two java files on a website?

    These are the links to the the two java files

    java file 1

    Moderator edit: link removed

    java file 2

    Moderator edit: link removed
    Last edited by DarrylBurke; 02-24-2012 at 09:00 AM. Reason: Removed links

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default Re: How do I put these two java files on a website?

    I don't see how the files are relevant to your question, so I've removed them.

    Now explain your requirement in adequate detail -- since you posted links to the files, they are obviously already on a website.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    goku4eternity is offline Member
    Join Date
    Dec 2010
    Posts
    12
    Rep Power
    0

    Exclamation Re: How do I put these two java files on a website?

    This is the code to the 1st file
    Java Code:
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    package tuna;
    
    /**
     *
     * @author jbeannie05
     */
    public class Tuna {
    private int hour;
    private int minute;
    private int second;
    public void setTime(int h, int m, int s){
        hour = ((h>=0 && h<24) ? h : 0);
        minute = ((m>=0 && m<60) ? m : 0);
        second = ((s>=0 && s<60) ? s : 0);
    }
    public String toMilitary(){
        return String.format("%02d:%02d%02d, hour, minute, second");
    }
    public String toString(){
        return String.format("%d:%02d:%02d %s", ((hour==0||hour==12)?12:hour%12), minute, second, (hour < 12? "AM": "PM"));
    }
    }
    This is the code to the 2nd file
    Java Code:
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    package apples;
    
    /**
     *
     * @author jbeannie05
     */
    public class Apples {
    
        /**
         * @param args the command line arguments
         */
        public static void main(String[] args) {
            tuna tunaObject = new tuna();
            System.out.println(tunaObject.toMilitary());
            System.out.println(tunaObject.toString());
            tunaObject.setTime(13, 27, 6);
            System.out.println(tunaObject.toMilitary());
            System.out.println(tunaObject.toString());
        }
    }
    How do I put these two .java files onto a website?
    The code is supposed to show military time and pacific standard time?
    Last edited by goku4eternity; 02-24-2012 at 10:13 AM.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,854
    Rep Power
    19

    Default Re: How do I put these two java files on a website?

    What do you mean by "onto a website"?
    As Darryl says, they already are...
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    santa's Avatar
    santa is offline Senior Member
    Join Date
    Nov 2009
    Location
    Sweden
    Posts
    208
    Rep Power
    5

    Default Re: How do I put these two java files on a website?

    I think he wants to make applets? =P

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default Re: How do I put these two java files on a website?

    Quote Originally Posted by santa View Post
    I think he wants to make applets? =P
    If that's true, he's getting ahead of himself as he needs to learn GUIs first. Sysouts wouldn't be much use in an Applet.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  7. #7
    santa's Avatar
    santa is offline Senior Member
    Join Date
    Nov 2009
    Location
    Sweden
    Posts
    208
    Rep Power
    5

    Default Re: How do I put these two java files on a website?

    Quote Originally Posted by DarrylBurke View Post
    If that's true, he's getting ahead of himself as he needs to learn GUIs first. Sysouts wouldn't be much use in an Applet.

    db
    true story =)

  8. #8
    goku4eternity is offline Member
    Join Date
    Dec 2010
    Posts
    12
    Rep Power
    0

    Default Re: How do I put these two java files on a website?

    Is my code wrong for an applet? Do I need to read a book on applets? I really don't like know much about java programming or java applets, and I don't like it when people can't give me the solution, and how am I supposed to figure out the solution when I don't know anything about java programming code. Do you want me to read every java programming book? If so. Which book should I read first?

  9. #9
    santa's Avatar
    santa is offline Senior Member
    Join Date
    Nov 2009
    Location
    Sweden
    Posts
    208
    Rep Power
    5

    Default Re: How do I put these two java files on a website?

    Introduction to Java Programming - Y. Liang ... also has a lot on applets. You should have some kind of displayable GUI before making it applets.

  10. #10
    goku4eternity is offline Member
    Join Date
    Dec 2010
    Posts
    12
    Rep Power
    0

    Exclamation Re: How do I put these two java files on a website?

    alright I will try to read the java applet book, i need to learn how to make a java applet a gui

  11. #11
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default Re: How do I put these two java files on a website?

    The Java™ Tutorials

    There are sections on creating a GUI and how to package and deploy Applets.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Download Files From A Website
    By anthropamorphic in forum Networking
    Replies: 3
    Last Post: 10-28-2011, 03:45 AM
  2. Replies: 4
    Last Post: 07-02-2011, 03:28 AM
  3. N00b questions - downloading files from a website
    By iflyboats in forum Networking
    Replies: 1
    Last Post: 05-28-2011, 05:30 PM
  4. How to download website (Get all link in website)
    By finalmem in forum Advanced Java
    Replies: 0
    Last Post: 11-12-2008, 08:43 AM
  5. running .class files on a website
    By jklsemicolon in forum Networking
    Replies: 10
    Last Post: 08-08-2008, 06:21 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
  •