Results 1 to 8 of 8

Thread: Java application tweaking

  1. #1
    Join Date
    Aug 2012
    Location
    Quincy, Illinois
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Java application tweaking

    I am working on a hobby application that I have and will be uploading it to launchpad when I figure out how. The first or trunk version will be a basis for any java application. However I need a little help figuring out how to change the default java app icon to a custom logo/icon. Basically I need to know what the best file format is and how to set it in my code to retrieve said file for the icon.
    Working is good for your soul and your wallet! But video games are just fun to play!

  2. #2
    Join Date
    Aug 2012
    Beans
    185

    Re: Java application tweaking

    If by "app icon" you mean the window icon:
    javax.swing.JFrame.setIconImage(Image image)
    or don't set any icon on the window but create and launch the app thru a ".desktop" file, like vuze/azureus does, which has an entry for the app/window icon.

  3. #3
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Java application tweaking

    Quote Originally Posted by MasterProgram View Post
    Basically I need to know what the best file format is and how to set it in my code to retrieve said file for the icon.
    I usually use PNG format.
    Quote Originally Posted by MasterProgram View Post
    ...how to set it in my code to retrieve said file for the icon.
    Code:
    import java.awt.Image;
    import java.net.URL;
    import javax.swing.*;
    
    public class MyClass extends JFrame{
        
        public MyClass(){
    
            setTitle("Your App Title");
            URL url = YourApp.class.getResource("images/yourimage.PNG");
            ImageIcon img = new ImageIcon(url);
            Image icon = img.getImage();
            setIconImage(icon);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        }
    
        public static void main (String args[])
        {}
    }
    Last edited by slickymaster; January 9th, 2013 at 04:53 PM.

  4. #4
    Join Date
    Aug 2012
    Location
    Quincy, Illinois
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Java application tweaking

    I have a project page on launchpad for this application, however I still need to learn a good way and the best way to upload an eclipse java app project to the launchpad using the terminal and bazaar explorer. I've asked this before and been told to subscribe to the launchpad-users team. I did this, however I have not been answered yet. Please somebody help me.
    Working is good for your soul and your wallet! But video games are just fun to play!

  5. #5
    Join Date
    Aug 2012
    Beans
    185

    Re: Java application tweaking

    Off topic, I myself tried using launchpad to host, compile & build my app and boy is it sophisticated, they require you to know a lot of stuff like bazaar, signatures management, how what where goes (and when), etc, so good luck with that, I gave up.

  6. #6
    Join Date
    Aug 2012
    Location
    Quincy, Illinois
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Java application tweaking

    Quote Originally Posted by bird1500 View Post
    Off topic, I myself tried using launchpad to host, compile & build my app and boy is it sophisticated, they require you to know a lot of stuff like bazaar, signatures management, how what where goes (and when), etc, so good luck with that, I gave up.
    Understandable, I probably keep going with it though. Nice to know that it isn't just me that has problems with it. What would be nice is if they could just have an upload area on the site.
    Working is good for your soul and your wallet! But video games are just fun to play!

  7. #7
    Join Date
    Aug 2012
    Location
    Quincy, Illinois
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Java application tweaking

    I am using the eclipse version that is offered on the software centre and I really want to try the bzr-eclipse plug-in to send my program to the launchpad code hosting servers. However I find myself in the predicament that the eclipse marketplace is not included in the application. Does anyone know how I can get it. I find it really weird that eclipse indigo on my mac downloaded from the eclipse site and the eclipse juno that I just finished removing have it but the software centre version isn't up to date. Come to think of it I also checked for updates in eclipse and it told me that there was an update that it couldn't download and install for I have insufficient access. If someone could help me resolve that it might take care of the problem.

    Adjust question, if I could get a little help in just being able to use eclipse itself to upload and maintain a code branch in launchpad that would really be of big help.
    Last edited by TheodoreP; January 14th, 2013 at 03:24 AM.
    Working is good for your soul and your wallet! But video games are just fun to play!

  8. #8
    Join Date
    Aug 2012
    Location
    Quincy, Illinois
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Java application tweaking

    Basically, I am having issues with uploading just certain items instead of full path directories. Any advice would be greatly appreciated. Also, if anyone knows how to delete files and folders from the branch I would like you to share it as well. Peace Out!
    Working is good for your soul and your wallet! But video games are just fun to play!

Bookmarks

Posting Permissions

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