How to put an icon to Jbutton with Jbuilder 5?

I have tried to make a jbutton with icon on it,
i create an image icon object and pass it to the jbutton.seticon method...
When create the image icon, it need the path of the icon file, what is the relative path of image in jbuilder?
(not absolute e.g file:///)
Thanks

What you need to do is
if your current class is Test and you image file is in the same directory called cat.gif then do the following
button.setIcon(new ImageIcon(Test.class.getResource("cat.gif")));
this should work
if you image file is in the previous directory you just type in "../cat.gif" and if you have a image directory reltaive then you put in "images/cat.gif"
I hope this helps

Similar Messages

  • How to put finder icon back into the dock?

    does anyone know how to put the finder icon back into the dock because that icon just disappeared and i have no idea how to put it back in. thank you so much if you know how!
    iBook 12-inch G4   Mac OS X (10.4.6)  

    lamfishy,
    Welcome to Apple Discussions.
    Find the com.apple.dock.plist file in your Macintosh HD/Users/yourusername/Library/Preferences Folder, drag it to the Desktop, log out/in or restart and let us know what happens.
    ;~)

  • I just want to know how to put Adobe Icon on my taskbar?

    I just want to know how to move Adobe Icon to my taskbar?

    What application under what OS?

  • How to put links in a document with Acrobat 8 or 9?

    I have a document that used to have some underscored blue colored words in different places of the document. Clicking on these words Acrobat jumps to another page of that document which is related to those blue words. I don't know why, but I lost those "internal hyperlinks". They do not work anymore. Then, how can I put them back? OR How can I create new internal links like the ones described?
    Thanks in advance.....

    Welcome to our community
    Unfortunately you seem to have taken a wrong turn somwehere and are lost in the forums. Based on what you have said, you are probably using Acrobat?
    If Acrobat is the product you are using, try posting the question at the link below:
    Click here to view
    If you aren't using Acrobat, you might try this other link. Click the link and you will see a page where you may click either some icons or a drop-down to choose the product you are haivng issues with.
    Click here to view
    Best of luck to you in finding help with what you need. Rick

  • How to put links in a document with Adobe 9 or 8?

    I have a document that used to have some underscored blue colored words in different places of the document. Clicking on these words it jumped you to another page of that document related to those blue words. I don't know why, but I lost those "internal hyperlinks". They do not work anymore. Then, how can I put them back? OR how can I create new internal links like the ones described?
    Thanks in advance.....

    Welcome to our community
    Unfortunately you seem to have taken a wrong turn somwehere and are lost in the forums. Based on what you have said, you are probably using Acrobat?
    If Acrobat is the product you are using, try posting the question at the link below:
    Click here to view
    If you aren't using Acrobat, you might try this other link. Click the link and you will see a page where you may click either some icons or a drop-down to choose the product you are haivng issues with.
    Click here to view
    Best of luck to you in finding help with what you need. Rick

  • How to put and burn two diaporama WITH DIFFÉRENT SOUND TRACK on one D,V,D

    I HAD A BIG PROBLEM! I HAVE MADE TWO chapters DIAPORAMA OF a band realated the history of the band. and i want to put them one one DVD .tHEY HAVE DIFÉRENT SOUND TRACK.
    My problem, is when i burn the Dvd only one show ? I use 1 video line and sound track and the second chapter on the video 2 and soundtrack 2 .It d'int make a différence .What did i do WRONG ?

    towline
    What version of Premiere Elements are you using and on what computer operating system is it running?
    Lots of possibilities.
    What do you mean "My problem, is when I burn the DVD only One Show"? Are you saying that instead of having two separate slideshows in DVD-VIDEO, you
    have the two running together as one slideshow?
    What menu markers (Chapter markers) are using - scene markers? Are there stop markers?
    How are your menu menu and scene menu set up?
    One scenario
    Timeline content set up....
    Slideshow 1 with a scene marker at its beginning and a stop marker at its end
    a few seconds gap
    Slideshow 2 with a scene marker at its beginning and NO STOP MARKER AT ITS END.
    (I put that in capital letters because putting a stop marker at the end of the last item of the Timeline 99.99999% of the time creates project failure.)
    With this setup, the viewer is greeted by the main menu and selects from Play Movie or Scene Selection.
    a. If Scene Selection is selected, the viewer is taken to the Scene Selection page where he/she picks a slideshow to watch.
    Important: If the viewer pick Slideshow 1, Slideshow 1 is played and then it reverts back to the main menu.
    b. In this type of scenario, the Play All Button on the main menu becomes meaningless, since selecting it will play only up to the
    stop marker ( end of Slideshow 1) and then revert back to the main menu.
    Alternately, you could create a main menu with the Slideshow 1 or Slideshow 1 choice (use main menu markers) and do away with the
    scene menu. That sounds abstract as written but I can give you how to on that and give you examples.
    First let us see if anything that I have written above has anything to do with what you really asked.
    Thanks. Clarification always available.
    ATR

  • How to put files in Oplayer hd with itunes

    I am trying to setup oplayer hd to watch movies on my ipad.  To stream them from my IMac using Oplayer hd to my ipad mini. I have found a description of how to do this at: www.blogtechnika.com/watch-any-video-on-your-iphoneipad-with-oplayer/
    The description tells me to go to itunes and select the apps tap and at the bottom of the page there is "file sharing" section. Then just select oplayer hd in the list and add files from there. My problem is that I cannot find the file sharing section at the bottom of my itunes.
    Any help would be greatly appreciated.
    Trey

    treyfromMS wrote:
    The description tells me to go to itunes and select the apps tap and at the bottom of the page there is "file sharing" section. Then just select oplayer hd in the list and add files from there. My problem is that I cannot find the file sharing section at the bottom of my itunes.
    As stated, select the iPad in iTunes.
    Click the Apps tab across top.
    Scroll to the bottom, below the apps on the left and the iPad screens on the right.
    -> iOS: About File Sharing

  • How to Put two icons together in a result field in ABAP

    Hi All,
    I have a results column in a report which basically show if the delievery was made on time/late/early. I also have a another column which shows icons as below.
    On Time: ICON_LED_GREEN.
    Late:     : ICON_LED_RED.
    Now what I am trying to do is in the same column I want to have 2 Icons. example i want to merge the following icons together,
    ICON_LED_RED & ICON_LESS_RED in the field.
    Is this possible? if so how
    Thanks

    why you need to merge both the lights in a column when there is no need to have  thse lights in ur column you just have to use them in your write statement.
    loop at i_final.
    if i_final-filed1 = 'early' or
       i_final-filed1 = 'timely' .
    write:/10 icons_led_green, 20 i_final-filed1.
    else.
    write:/10 icons_led_red, 20 i_final-filed1.
    endif.
    endloop.

  • How to sync page icon in TOC with file type of baggage file?

    all our pages are linked to baggage files (yes, we're also
    using RoboHelp for document archiving). is there any way to set up
    the skin such that the page icon in the TOC reflects the type of
    the attached baggage file? i.e., shows the acrobat icon when the
    baggage file is a .PDF, the MS Word icon when the baggage file is a
    .DOC, and so on.
    thanks much for any help/pointer
    --meg

    When I have created bitmap icons in the past (used to work for a software company) I used to create them with either a icon creator tool (Axialis) or directly in photoshop.
    For color depths 24 BPP or less, the transparency is coded by using a fixed color. Each pixel that have this exact color will be converted as transparent when the image is loaded in the toolbar. Usually, the color used is green RGB(0,255,0) or magenta RGB(255,0,255). The problem of this method is that if you use a pixel of that color in your icon image (not the background), it will be converted as transparent. The other issue is the poor quality of the borders (around the icons) because it does not permit smooth transparency. In other words, a pixel is either 100% transparent or 100% opaque, there is no variable transparency. It results in "aliasing" on borders for icons with rounded shapes.
    This is an old technique so you will struggle to get the desired results but worth you having a look for "creating bmp icons with transparency" online.

  • How to put sound to a JButton.

    How can I add sound to a JButton if it isn't an applet.
    It is an application.

    hi hugh,
    ty for ur tym for answring and I appreciate it alot, can u
    tell me how can i get d video dt u r talking about?
    can u give me d link? is it free?
    hope u give me another tym of your bc sked.
    many tnx
    norman

  • How to put music into iphone 5 with another Itunes 11??

    I have a computer back at home which i originally used with my Iphone 5. Im at college right now and i just bought a laptop, downloaded Itunes 11, and have some music i want to put on to my Iphone but i cant. I just realized that you cannot put music into your Iphone without the original computer you synced it with. Even though i have authorized this laptop; this laptop being the second authorized, cant seem to put music into my Iphone. I then tried to check off the Manually manage music and videos box and it prompted me by saying i have to delete everything in my Iphone and get it synced with the itunes on my laptop in order to put in music and videos. I dont want to do this. Does anyone know another way around this???? I know with an Ipod you dont go through this kind of crap. Any kind of help would be appreciated! My IOS for my iphone5 is 6.1.4. I dont know if this effects anything.

    There's the easy way and the hard way. The easy way is to copy the backup that you should have kept of your old computer to the new computer's iTunes (see: http://support.apple.com/kb/HT4527). Then just sync the iPhone. The hard way is to extract the data from your phone. The phone was never intended as a backup device, so you will not get everything back perfectly, but it's as close as you can get. See: Syncing to a "New" Computer or replacing a "crashed" Hard Drive

  • How to put namespace into soapenv:Body with UTL_DBWS?

    We are trying to make the following SOAP call from Oracle.
    Outside Oracle (SoapUI v 3.6.1), the following call, generated by the tool, works:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebp="http://www.sap.com/EBPPBillDelivery" xmlns:ebp1="http://www.sap.com/EBPPTypes">
    <soapenv:Header/>
    <soapenv:Body>
    <ebp:BillerDataMsg>
    <!--Optional:-->
    <ebp1:Authorization>
    <ebp1:UserName>uid</ebp1:UserName>
    <ebp1:Password>pwd</ebp1:Password>
    </ebp1:Authorization>
    </ebp:BillerDataMsg>
    </soapenv:Body>
    </soapenv:Envelope>
    With UTL_DBWS, I have
    l_service UTL_DBWS.service;
    l_call UTL_DBWS.CALL;
    l_service := UTL_DBWS.create_service (
    wsdl_document_location => URIFACTORY.getURI('file://appl/pc_files/spool/Wsdl/EBPPBSPServices.wsdl')
    ,service_name => UTL_DBWS.to_qname('http://www.sap.com/EBPPBSPServices','EBPPBSPServices')
    l_call := UTL_DBWS.create_call (
    service_handle => l_service
    ,port_name => UTL_DBWS.to_qname('http://www.sap.com/EBPPBSPServices', 'EBPPBSPServicesPort')
    ,operation_name => UTL_DBWS.to_qname('http://www.sap.com/EBPPBSPServices', 'getBillerData')
    utl_dbws.set_property(l_call, 'OPERATION_STYLE', 'document');
    utl_dbws.set_property(l_call, 'SOAPACTION_USE' , 'TRUE');
    utl_dbws.set_property(l_call, 'SOAPACTION_URI', 'http://www.sap.com/EBPPBSPServices/getBillerData');
    vx_xml_out := UTL_DBWS.invoke(
    call_Handle => l_call
    ,request => XMLType('<?xml version="1.0" encoding="utf-8"?><ebp:BillerDataMsg xmlns:ebp="http://www.sap.com/EBPPBillDelivery" xmlns:ebp1="http://www.sap.com/EBPPTypes"><Authorization><UserName>uid</UserName><Password>pwd</Password></Authorization></ebp:BillerDataMsg>'));
    *ORA-29532: Java call terminated by uncaught Java exception: port: {http://www.sap.com/EBPPBSPServices}EBPPBSPServicesPort does not contain operation: BillerDataMsg*
    If I could manage to put namespaces xmlns:ebp="http://www.sap.com/EBPPBillDelivery" and xmlns:ebp1="http://www.sap.com/EBPPTypes" into soapenv:Envelope or soapenv:Body attributes, as I do in soapUI, it would work.
    But I have found no fuhction with such functionality in UTL_DBWS.
    Is using UTL_HTTP and making SOAP message manually the only way to call SAP web services? Normally, Oracle people advices to use UTI_DBWS over UTL_HTTP, but in this case it does not work.
    Igor

    I prefer using UTL_HTTP directly for SOAP calls - and not UTL_DBWS that IMO has a very clunky interface. SOAP is simply a XML payload over HTTP. Not that complex to do natively using UTL_HTTP.

  • How to put in waypoints in maps with the iphone 5

    Antone know if you can put waypoints into MAPs on the IPHONE 5??

    Drop a pin is almost similar.  You can click on info button on map and drop a pin to the location you want.

  • How to put 'NA' in text filed with numeric value

    Dear fellows,
    I need to do one think in my forms, and that is I want to put value 'NA' instead of null values in numeric field in my forms, when no number is inserted than NA will be written there.
    Could it is possible or not, if so kindly help me in this regard I will be thankful.

    Dear Gerd Volberg
    Thanks dear for your reply, one think more, if I need to do like this that in one form data is entered and on second form I just need to display the numeric value but when a null value occur just NA is shown. Could it possible.
    If so please help me.

  • I downloaded a song to iTunes but I don't know how to put it on my iPod (with the newest iTunes).

    I had downloaded a song to my iTunes library on my laptop (not mac) and I have no clue to put it onto my ipod. Any help?

    Click here and follow the instructions.
    (83034)

Maybe you are looking for