Thread: Java coffee cup icon

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Java coffee cup icon 
    Banned

    Join Date
    Apr 2013
    Posts
    1,456
    Thanks given
    341
    Thanks received
    148
    Rep Power
    0
    Hello rune-server so today i am going to show you all how to change the java coffee cup icon now before you say it has been released before The answer to that is yes it has but this is better you may ask why and here it is here is the old tutorial

    http://www.rune-server.org/programmi...ffee-icon.html
    http://www.rune-server.org/runescape...java-icon.html

    Now on the old once you did not get the custom icon until you have downloaded the cache witch does not look very professional my version makes it so you dont have to download the cache and when you update the image on the site you are getting it from it will update on its own and you don't have to do anything



    Difficulty: 1/10
    Files Edited: RsFrame/Jframe




    Go into RsFrame or Jframe.java look for
    Code:
    public RSFrame
    Inside that method above your client title add this

    Code:
        
    URL url2 = null;
            boolean updateIcon = true;
            try {
                url2 = new URL("https://dl.dropboxusercontent.com/s/29ea8p9jpb0bpk5/icon.png");
            } catch (MalformedURLException ex) {
                updateIcon = false;
                ex.printStackTrace();
            }
            if (update) {
                System.out.println("Icon updated.");
                Image bimg = Toolkit.getDefaultToolkit().getImage(url2);
                this.setIconImage(bimg);
            }
    The only thing you will have to change is the link to your sprite witch i have highlighted in Red

    Next add this import at the top

    Code:
    import java.net.MalformedURLException;
    import java.net.URL;

    You could make this work for other things like your cursor


    Fixed
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Donator


    Join Date
    Jan 2010
    Age
    29
    Posts
    4,122
    Thanks given
    274
    Thanks received
    551
    Rep Power
    738
    Nice what is the max pixels for the icon?
    Reply With Quote  
     

  4. #3  
    Banned

    Join Date
    Apr 2013
    Posts
    1,456
    Thanks given
    341
    Thanks received
    148
    Rep Power
    0
    Quote Originally Posted by Memphis Depay View Post
    Nice what is the max pixels for the icon?
    Use any size it to re size it to fit i have that icon 1024x1024
    Reply With Quote  
     

  5. #4  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    This won't change the image of the application when on a Mac. You need the Application class.

    Code:
    Application.getApplication().setDockIconImage(icon32.getImage());
    Reply With Quote  
     

  6. #5  
    Banned

    Join Date
    Apr 2013
    Posts
    1,456
    Thanks given
    341
    Thanks received
    148
    Rep Power
    0
    Quote Originally Posted by Jason View Post
    This won't change the image of the application when on a Mac. You need the Application class.

    Code:
    Application.getApplication().setDockIconImage(icon32.getImage());

    Oh ye did not think of that i will look into it but i dont have a mac so hard to test lol
    Reply With Quote  
     

  7. #6  
    Donator

    Join Date
    Jun 2014
    Posts
    58
    Thanks given
    4
    Thanks received
    10
    Rep Power
    51
    Bump for my boi
    Reply With Quote  
     

  8. Thankful user:


  9. #7  
    Registered Member
    Join Date
    Nov 2009
    Posts
    31
    Thanks given
    1
    Thanks received
    0
    Rep Power
    1
    src\Jframe.java:35: error: cannot find symbol
    updateIcon = false;
    ^
    symbol: variable updateIcon
    location: class Jframe
    src\Jframe.java:41: error: cannot find symbol
    this.setIconImage(bimg);
    ^
    symbol: method setIconImage(Image)
    2 errors
    Reply With Quote  
     

  10. #8  
    Registered Member SpinninRecords's Avatar
    Join Date
    Aug 2013
    Age
    26
    Posts
    329
    Thanks given
    60
    Thanks received
    25
    Rep Power
    32
    Quote Originally Posted by anc13nt pure View Post
    src\Jframe.java:35: error: cannot find symbol
    updateIcon = false;
    ^
    symbol: variable updateIcon
    location: class Jframe
    src\Jframe.java:41: error: cannot find symbol
    this.setIconImage(bimg);
    ^
    symbol: method setIconImage(Image)
    2 errors
    I got the same error. but mine says 1 error Screenshot by Lightshot
    Reply With Quote  
     

  11. #9  
    Banned

    Join Date
    Apr 2013
    Posts
    1,456
    Thanks given
    341
    Thanks received
    148
    Rep Power
    0
    Quote Originally Posted by SpinninRecords View Post
    I got the same error. but mine says 1 error Screenshot by Lightshot
    Do it again should work
    Reply With Quote  
     

  12. #10  
    Registered Member SpinninRecords's Avatar
    Join Date
    Aug 2013
    Age
    26
    Posts
    329
    Thanks given
    60
    Thanks received
    25
    Rep Power
    32
    Quote Originally Posted by Christian_ View Post
    Do it again should work
    I got it working. I used a different method because mine is Galkons Refactored.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 25
    Last Post: 06-01-2014, 04:30 AM
  2. Changing Java "cup of coffee" Icon
    By RS Wiki in forum Application Development
    Replies: 14
    Last Post: 02-18-2014, 02:47 AM
  3. [REQUEST] Java Cup Player Sprite
    By Stevie in forum Requests
    Replies: 3
    Last Post: 03-22-2013, 02:32 AM
  4. Replies: 26
    Last Post: 07-04-2012, 10:57 PM
  5. [Renamed]Java Icon Rep++ ??
    By TrustedDealer in forum Help
    Replies: 17
    Last Post: 11-16-2011, 09:47 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •