Replacing Java Cup Image with Custom Image

Hi
i have a Jframe for which i want to replace the java cup icon that appears at the Top Left Most corner of the bar with a image of my own.How can i do this?

import javax.swing.*;
public class Test extends JFrame {
    public Test() {
        java.net.URL imgURL = Test.class.getResource("icon.jpg");
        setIconImage(new ImageIcon(imgURL).getImage());
        setSize(400,400);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setVisible(true);
    public static void main(String[] args) {
        new Test();
}

Similar Messages

  • Replacing Java cup icon - ATL tab

    Hi,
    I want to replace the Java cup icon with one of my icons.
    I can do that OK using the JFrame.setIconImage() method. (By the way, I think it should have been possible to do so using the Look and Feel only rather than explicitely setting the icon on each frame...)
    My problem is that on Windows, when switching from one application to another using the ALT - Tab keys, the icon that is displayed is my icon uglyly enlarged...
    Is there a way to setup TWO images to be used :
    - one (16*16) for the small icon on top of the window and
    - another one (32*32) that would be used for the application switching screen ???
    How come the coffee cup is actually nice looking when displayed on the application switching screen ?

    Unfortunatly you can't do that.
    Try to use a 32*32 icon only. It will be streched automatically to 16*16 in the frame title bar.
    Denis

  • How Can I replace newScale Text Strings with Custom Values?

    How Can I replace newScale Text Strings with Custom Values?
    How can I replace newScale text strings with custom values?
    All  newScale text is customizable. Follow the procedure below to change the  value of any text string that appears in RequestCenter online pages.
    Procedure
    1. Find out the String ID of the text string you would like to overwrite by turning on the String ID display:
    a) Navigate to the RequestCenter.ear/config directory.
    b) Open the newscale.properties file and add the following name-value pair at the end of the file:res.format=2
    c) Save the file.
    d) Repeat steps b and c for the RmiConfig.prop and RequestCenter.prop files.
    e) Stop and restart the RequestCenter service.
    f) Log  in to RequestCenter and browse to the page that has the text you want  to overwrite. In front of the text you will now see the String ID.
    g) Note down the String ID's you want to change.
    2. Navigate to the directory: /RequestCenter.ear/RequestCenter.war/WEB-INF/classes/com/newscale/bfw.
    3. Create the following sub-directory: res/resources
    4. Create the following empty text files in the directory you just created:
    RequestCenter_0.properties
    RequestCenter_1.properties
    RequestCenter_2.properties
    RequestCenter_3.properties
    RequestCenter_4.properties
    RequestCenter_5.properties
    RequestCenter_6.properties
    RequestCenter_7.properties
    5. Add the custom text strings to the appropriate  RequestCenter_<Number>.properties file in the following manner  (name-value pair) StringID=YourCustomTextString
    Example: The StringID for "Available Work" in ServiceManager is 699.
    If you wanted to change "Available Work" to "General Inbox", you  would add the following line to the RequestCenter_0.properties file
         699=General Inbox
    Strings are divided into the following files, based on their numeric ID:
    Strings are divided into the following files, based on their numeric ID:
    String ID  File Name
    0 to 999 -> RequestCenter_0.properties
    1000 to 1999 -> RequestCenter_1.properties
    2000 to 2999 -> RequestCenter_2.properties
    3000 to 3999 -> RequestCenter_3.properties
    4000 to 4999 -> RequestCenter_4.properties
    5000 to 5999 -> RequestCenter_5.properties
    6000 to 6999 -> RequestCenter_6.properties
    7000 to 7999 -> RequestCenter_7.properties
    6. Turn off the String ID display by removing (or commenting out) the line "res.format=2" from the newscale.properties, RequestCenter.prop and RmiConfig.prop files
    7. Restart RequestCenter.
    Your customized text should be displayed.

    I've recently come across this information and it was very helpful in changing some of the inline text.
    However, one place that seemed out of reach with this method was the three main buttons on an "Order" page.  Specifically the "Add & Review Order" button was confusing some of our users.
    Through the use of JavaScript we were able to modify the label of this button.  We placed JS in the footer.html file that changes the value of the butt

  • How to replace the cup image in the frame with my own image

    How can i change the default cup image in the top left corner of a frame to the image that i wanted in JDeveloper ?

    Here is a one line piece of code that will do the same.
    setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon File]")));
    Note:
    There is a way to create a resource bundle ( preferrable on large projects ) and add image files, then you can just use the properties editor to select a particular icon image for your frame.

  • Java.rmi.NoSuchObjectException with custom InputStream/OutputStream

    I'm experiencing a strange problem here...and have spent the night digging for an answer,
    but I don't see any...
    I am using a custom client/server socket factory, which works great until I return my
    custom In/Out streams from the custom Socket. I can return a BufferedInputStream
    wrapping the socket's InputStream, but if I write a subclass BufferedInputStream
    (and override no methods) I get the NoSuchObjectException...
    any ideas?
    public class BInputStream extends java.io.BufferedInputStream {
      private InputStream in = null;
      public BInputStream(InputStream in) {
        super(in);
        this.in = in;
    }

    What I am trying to do (and have done with the minor limitation that I cannot use
    custom streams to compress the RMI traffic...) is create a totally transparent proxy
    for RMI services.
    The Proxy object is for any Remote object. A Proxy is returned to the client
    containing a Remote Invoker that is called by the Proxy's InvocationHandler.
    Since this is for a known environment, there is no need for dynamic class loading,
    so the JVMs must all have the classes to talk to one another...
      A <---> B <---> CI want to, now, compress the A <--> B link, because it is over a saturated link, and
    a cursory look at the actual data tells me I can compress 300k, which is a standard
    transaction size (after pruning classpath entries from the clients), to around 40k
    (conservative estimate). Obviously, this is a huge improvement in any environment,
    but an especially appealing one considering the fact that this link slows, literally, to
    a crawl at times. I already have the inflate/deflate streams worked out as far as I can
    test them, so all I need to do is get past this current stumbling block and test the
    compression bits in an environment more representative of the deployment env.
    Anyway, that's the highest level goal :-)
    So, a question...to confirm what I believe I found earlier that led me into this bowl
    of noodles (really, it's not that bad, except that I can't debug the code once
    it wanders off into RMI land, which may indicate a problem in my design :-P)...
    [after some more time poking around to make sure I'm not asking a stupid
    question]
    It seems my spaghetti (the exporting of the Invoker inside of the InvocationHandler)
    is necessary for the transparency I desire. As it turns out, I know enough now to
    find useful information from google on this subject :-) That's some progress!
    It seems springframework has something exactly like the server half of my
    system, so I'm gonna take a look at that as I wind this day down.
    cheers.
    b

  • Replacing standard  usermanagement par with custom usermanagement par

    Hi all,
    I had to make some changes on the standard user administration(like hiding fields, creating new fields), for which I have downloaded the standard com.sap.portal.usermanagement.admin.par.
    i made a copy(com.***.portal.usermanagement.admin.par) of it and made the changes it works fine with all the changes when I run it from portalapp.xml
    Now I need to put this par file in place of the standard one for the changes to effect.
    Any idea what all configuration changes do I need to make
    thanks in advance
    Paul

    Detlev
    I have made similar changes to the com.sap.portal.runtime.logon par. which is the logon page to the portal.
    What I have done there is made a copy of the standard par, customised it.
    Now I copied the custom par back into the PCD.
    Then I modified the authshemes,xml file, replacing all the occurances of string com.sap.portal.runtime.logon with com.***.portal.runtime.logon(custom par).
    Restarted the j2ee engine , I have the new logon page working.
    I have all the standard functionality working fine along with the changed look and feel.
    I m thinking there should be a similar way out for the usermanagement par too.
    let me know if u have any inf.
    thanks.

  • Replacing the standard workflow with Custom Workflow

    Hi Experts..!!
    I need one help ..!!!
    I want to know how can I replace the standard work flow of Travel Management WS2000050 / WS2000040  with my custom Workflow. Please help    me..!!
    Thanks & Regards:
    Gaurav Singh

    Hi Gaurav
    check below link
    http://wiki.scn.sap.com/wiki/display/ERPHCM/Workflow+Customizings+in+Travel+Management
    Travel management workflow temapltes you mentioned in your query are teiggered from event CREATED of busines object BUS2089. You just need to define same event as triggerimg event for your cust workflow in basic data setting (hat symbol) in swdd. Also go to standard workflow templates in swdd and check if event linkages are active (in green) if yes then dwactivate it by clicking on option A gree icon or by going in transaction SWETYPV.
    REGARDS
    IBRAHIM

  • PKCS#11 - JAVA - Hardware crypto with custom algorithm!??

    Hello!
    I'm wondering if it is possible to use the SUN provider in JDK1.5.0 for PKCS#11 with a hardware based crypto card which does not use any of the algorithms specified in the field guide of PKCS#11 for jdk1.5.0. Instead a custom algorithm that is implemented on this card will be used for encryption/decryption.
    It should be transparent for the application what kind of algorithm that is used to encrypt/decrypt since I will send the data that will be encrypted/decrypted to this hardware card.
    If it is not supported by the sun provider. What would be necessary to do to get this to work?
    The card I'm about to use has an PKCS#11 API.

    At this moment I don't really know the specifics on these hardware accelerators, hence my question. If it not is an algorithm that is in the refrence guide for PKCS#11, then I would like to know if there's any way to use the algorithm anyway using the PKCS#11 "wrapper" in jdk1.5.0.....
    And a follow question, If it is not supported what would be the easiest way to use the PKCS#11 API of the hw -card.... I suppose to write some JNI code to send in the data to be encrypted and get the encrypted answer back?
    /Henrik

  • Batch Reading with Custom SQL

    Hello,
    Queries
    1. Is it possible to use Batch Reading in conjunction with Custom Stored Procs/ SQL?
    2. Is it possible to map an attribute to a SQL expression (like in Hibernate we have formula columns mapped using the formula* property)?
    Background
    1. We use Toplink 11g (11.1.1.0.1) (not EclipseLink) in our application and are controlling mapping using XML files (not annotations).
    2. We are migrating a legacy application with most of its data retreival logic present in stored procedures to Java.
    3. I am effectively a newbie to Toplink.
    Scenario
    1. We have a deep class heirarchy with ClassA+ at the following having a one-to-many relation with ClassB+ and ClassB+ having a one-to-many relation with ClassC+ and so on and so forth.
    2. For each of these classes the data retreival logic is present in stored procedures (coming from the legacy application) containing not so simple queries.
    3. Also there are a quite a few attributes that actually represent computed values (computed and returned from the stored procedure). Also the logic for computing the values are not simple either.
    4. So to make things easy we configured toplink to use the stored procedures to retreive data for objects of ClassA+, ClassB+ and ClassC+.
    5. But since the class heirarchy was deep, we ended up firing too many stored procedure calls to the database.
    6. We thought we could use the Batch Reading feature to help with this, but I have come across documentation that says that it wont work if you override toplink's queries with stored procedures.
    7. I wrote some sample code to determine this and for the heirarchy shown above it uses the speicifed Custom procedure (I also tried replacing the stored procs with custom SQL, but the behavior is the same) for ClassA+ and ClassB+, but for ClassC+ and below it resorts to its own generated SQL.
    8. This is a problem because the generated SQL contains the names of the computed columns which is not present in the underlying source tables.
    Thanks
    Arvind

    Batch reading is not supported with custom SQL or stored procedures.
    Join fetching is though, so you may wish to investigate that (you need to ensure you return the correct data from the stored procedure).
    James : http://www.eclipselink.org

  • How to set color space to JPEG image with Java advance Imaging

    How to set color space to JPEG image with Java advance Imaging.
    is there any API in JAI which support to set color space.

    I'm definately no guru, but this is how you can change it.
    CTRL + ALT + Click on the part of the component that you want to change. This brings up the Hidden Dom Inspector, background of component will be surrounded with a red outline (Make sure the red outline is surrounding the part of the tabset you want to change), Now you go to properties sheet and click the ellipses next to rules property this will pop up a dialog you look in this list (At the top) to see the default style classes that are affecting the rendering of the component outlined in red. (You will be able to select different sections of a single component) then you just rewrite the style class that you want to change in your Stylesheet (You will not find the styleclass that you want to change because it is a part of your theme .jar but as long as you name it exactly the same and place in your stylesheet it will override the theme .jar style classes) it's actually very easy -- you were right should be a piece of cake for a guru. Don't have the link handy but you can check out Winston's Blog on changing Table Formatting to get this information...It is EXTREMELY useful if you want your apps to have a custom look and not default that comes with Creator Themes.
    Hope this helps you out God knows others have helped me alot!
    Jason

  • Is it possible to replace the folder image in the bookmarks list with little images to help identify the folder. I see that many places I have bookmarked automatically come with a little picture (the CBS "eye", New York Times Old English Script).

    When I open my list of bookmarks most of the folders I have established have only the little file folder icon to the left. I would like to replace this file folder with some little picture or symbol to make the folders more easily identifiable. Is this possible?

    There aren't extensions that can replace the favicon of a bookmarks folder AFAIK, so you will have to do that via code in userChrome.css in the chrome folder below the @namespace line.
    *Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    *http://kb.mozillazine.org/userChrome.css
    *http://kb.mozillazine.org/Editing_configuration
    You can use the ChromEdit Plus or Stylish extension to have easier access to the customization files.
    *ChromEdit Plus: http://webdesigns.ms11.net/chromeditp.html
    Folder names (label="name") are cases sensitive and need to match exactly what you get via the properties
    Pace the folder-icon.png icons in the same chrome folder.
    This code works for icons on the Bookmarks Toolbar.
    <pre><nowiki>#personal-bookmarks .bookmark-item[container][label="Folder_Name"]{
    list-style-image:url('folder-icon.png')!important;
    -moz-image-region:auto!important;
    </nowiki></pre>

  • Replace Internet Explorer Image with Site Image

    I would like to replace the IE image or any image in the
    address bar with the image of the website. Is this doable and if so
    how would I go about doing this.
    Thank you in advance.

    canadianflower wrote:
    > I would like to replace the IE image or any image in the
    address bar with the image of the website. Is this doable and if so
    how would I go about doing this.
    Google favicon.ico.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Replacing low-res images with hi-res images

    I have an animated image sequence I created with low-res downloads for client approval. Now that they approved the images I want to replace the low-res with hi-res versions but keep my sizing, etc. Is there a way/command to accomplish this without having to resize every image?
    Motion 4.
    Thanks
    -Scott

    well the easy way to just replace the images is to either click on each of the images in the media tab and then click on replace media, navigating to your hi-rez versions. Or perhaps even easier would be to name all the hi-rez versions identically to the low rez ones and then in the Finder put the hi-rez ones where the low rez ones are. Of course you will still have to resize the high rez ones, but its easier than replacing each on in the timeline.
    hth
    adam

  • Keynote crashes with custom images bullets

    Anyone had problems with custom image bullets? I am using a custom image bullet – a simple bracket set that's not supported by Keynote because it's a glyph – so I saved the image file as a png file and placed it as a custom bulllet. Now if I add a new text box (sans bullet) it automatically adds the bullet and I can't remove it. Also, if I try to copy and paste a text box it force quits Keynote even though a bullet isn't used. It seems like obviously the problem is the bullet so I've tried deleting it from all master pages and existing pages and it hasn't helped.
    I'm still using the old version of Keynote but would this be resolved in the new Keynote? I haven't read much positive about the new Keynote so I'm apprehensive.

    Hello!
    Can somebody give a hint here? We are blocked by this problem.
    Regards,
    +manuel-

  • How to fix bad line spacing with custom image bullet when displaying on iPad

    So I have a presentation with custom image bullets for a couple slides. The bullets are fine when displayed on a mac, but when I move it over to the iPad the line spacing of the bullets and the text gets further out of horizontal alignment the more lines I add. I've tried adjusting the size of the bullets larger and smaller to see if that would help but it makes no difference either way.
    I know the easiest thing is to get rid of the custom image bullets, but this issue makes no sense to me and I'd really like to solve it.
    Here's how it looks on the mac:
    Here's how it looks on the iPad (took a photo and I know it's a little warped but I've shown where the issue is occurring):

    -> press '''CTRL''' + '''0''' (zero) to '''Reset''' Zoom
    * For details, see this article -> [[How do I use Zoom?]]
    Check and tell if its working.

Maybe you are looking for

  • Help needed for ALV report

    Hi, i need to add coloums for the existing report which picks from G/L account. in this report I need to add some more columns from COSP-KSTAR, which shows the cost element details from G/L account. I need to restrict that cost element number accordi

  • Help my installation wont start up and i cant eject the disk

    I dropped my macbook and a folder appeared no matter what i did i couldnt get it to power back up so I decided to use the re install disk after checking to make sure nothing was wrong with hardware. It refused to install on any setting except erase a

  • What comp. monitor is considered latest/best? and what cables do I use?

    Hi there, I´ve read quite some posts but am still not sure about what to do. I hope there is someone who really knows how and what to help me a hand. My questions relates to setting up the new MM with dual displays, 1 for HDTV to watch movies and num

  • Video deleted from iPad mini - help, please

    I took a video on an iPad mini, which was then deleted by accident.  It was not backed up on the Cloud or iTunes.  My understanding is that only a data recovery software will help me retrieve that video...but which one do I trust?  Is there one that

  • EDM profile uploading

    Hi, I Ihave developed a report to upload edm profile at an interval of 15 minutes.I am fetching installatiion number ,date ,unit of consumption and the consumption values at 15 mins interval from a text file.My report is inserting values to the datab