Thread: Changing java icon to custom icon

Results 1 to 6 of 6
  1. #1 Changing java icon to custom icon 
    Extreme Donator

    Join Date
    Apr 2013
    Posts
    84
    Thanks given
    21
    Thanks received
    2
    Rep Power
    11

    Hi

    I have been trying to change the java icon to my custom icon so that it will appear in the task bar and client frame. I have went into Jframe and this is what I saw

    Code:
    public void setClientIcon() {
            Image img = Client.resourceLoader.getImage("icon");
            if(img == null)
                return;
            frame.setIconImage(img);
    		}
    I*added .png so it was "icon.png". The image path is com\arlania\images. I looked within the resourceloarder.java file and also added the path to the file.

    Code:
    public static Image loadImage(String imageName) {
    		URL url = null;
    		try {
    			url = rl.getClass().getResource("images/" + imageName);
    		} catch (Exception e) {
    			e.printStackTrace();
    		}
    I have also tried almost every method online and I just cant seem to get it working. I don't have any errors when running the client. I am using a ruse base client. My discord is*Kishan#9476.

    Reply With Quote  
     

  2. #2  
    Development Services √

    Oogle's Avatar
    Join Date
    Apr 2012
    Age
    25
    Posts
    3,976
    Thanks given
    650
    Thanks received
    516
    Rep Power
    483
    In your jframe class look for setTray and under that add something like this

    Code:
    Image icon = Toolkit.getDefaultToolkit().getImage(String.valueOf(dir + "icon.png");


    Attached image

    Attached image
    Reply With Quote  
     

  3. #3  
    Extreme Donator

    Join Date
    Apr 2013
    Posts
    84
    Thanks given
    21
    Thanks received
    2
    Rep Power
    11
    Quote Originally Posted by OogleBoogle View Post
    In your jframe class look for setTray and under that add something like this

    Code:
    Image icon = Toolkit.getDefaultToolkit().getImage(String.valueOf(dir + "icon.png");
    So I tried that it, it still didn't work I have
    Image icon = Toolkit.getDefaultToolkit().getImage(signlink.find cachedir()+"/Interfaces/icon.png");
    I placed the icon.png into the interfaces folder cache folder and still nothing
    Reply With Quote  
     

  4. #4  
    Development Services √

    Oogle's Avatar
    Join Date
    Apr 2012
    Age
    25
    Posts
    3,976
    Thanks given
    650
    Thanks received
    516
    Rep Power
    483
    Quote Originally Posted by kishan View Post
    So I tried that it, it still didn't work I have I placed the icon.png into the interfaces folder cache folder and still nothing
    Send me a discord req L.Kenn#6431


    Attached image

    Attached image
    Reply With Quote  
     

  5. Thankful user:


  6. #5  
    Banned

    Join Date
    Dec 2019
    Age
    31
    Posts
    376
    Thanks given
    361
    Thanks received
    214
    Rep Power
    0
    Quote Originally Posted by kishan View Post
    So I tried that it, it still didn't work I have I placed the icon.png into the interfaces folder cache folder and still nothing
    Try removing this , its probably reading from the wrong directory.

    Image icon = Toolkit.getDefaultToolkit().getImage(signlink.find cachedir()+"/Interfaces/icon.png");
    Reply With Quote  
     

  7. Thankful user:


  8. #6  
    Development Services √

    Oogle's Avatar
    Join Date
    Apr 2012
    Age
    25
    Posts
    3,976
    Thanks given
    650
    Thanks received
    516
    Rep Power
    483
    Fixed


    Attached image

    Attached image
    Reply With Quote  
     

  9. Thankful user:



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: 7
    Last Post: 07-28-2015, 04:10 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. Change old skill icons to new ones?
    By Snoweye in forum Help
    Replies: 4
    Last Post: 06-12-2011, 11:14 PM
  4. Changing wildy and safe icon to custom one?
    By guppycity in forum Help
    Replies: 0
    Last Post: 04-11-2010, 03:56 AM
  5. Replies: 12
    Last Post: 02-21-2010, 10:50 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
  •