JButtons and images question

hey sorry to disturb people
quick question about JButtons i have created several buttons all have been cretaed using an ImageIcon, i would now like to be able to change the image on the button when triggered by another event, is there a such method ( a bit like setText) that will allow me to change the image on the button
thanks very much for your time
pants3uk

Reading the API, I find:
setIcon(..);

Similar Messages

  • Fixing Text and Image questions

    Is there a way to make the back ground translucent so that
    you can vagly see the background image. Like some way to change the
    opacity in a container?
    How come when I create a div tage and insert a picture in
    there. I hit enter right after the picture to type in text there is
    spacing from the top of the picture to the top of the container? I
    want it so that top of the picture still remains flush. I can't
    figure out how to keep it there.The only soluction I came up with
    is to hit shift enter then type txt below. That keeps the container
    flush with the top. Oh I forgot to mention I also have it set to
    float left. Can someone help me with this problem.
    One last question. I have test on the left hand side of the
    page going down, in a menu fashing. I hit shift enter after each
    row so the spacing is somewhat close. But when I try to indent a
    row it indents the whole thing. Is there a way to just indent a row
    buy itself if the row was created using shift enter?
    Thanks for being so helpful :)

    >>How come when I create a div tage and insert a
    picture in there. I
    hit enter right after the picture to type in text there is
    spacing from
    the top of the picture to the top of the container?
    I'll guess that you're using design view. When you hit
    <enter> and your
    cursor is to the right of your image, Dreamweaver puts the
    image in <p>
    tags. <p> tags have an inherent margin, which is why
    you're seeing space
    above the image. You can add some css code to the head of
    your page (or
    add it to your external style sheet) as such -
    p {margin: 0;}
    >>I hit shift enter after each row so the spacing is
    somewhat close.
    Try using css to control your spacing, instead of using
    shift-enter.
    Likewise, you can also use css to take care of your indents.
    BUT...it would be good to see your page, instead of guessing
    how you
    have set things up. Do you have a link?

  • JButton and ImageIcon question ?

    hi,
    i want to create a simple button with an icon image, i have used the following code :
    toolBar = new JToolBar();
    toolBar.setPreferredSize(new Dimension(100,50));
    toolBar.setRollover(false);
    JButton button = new JButton(new ImageIcon("Stop16.gif"));
    button.setPreferredSize(new Dimension(40,40));
    toolBar.add(button);this code belong to my JMainFrame (extends JFrame), and the "Stop16.gif" file is in the same location as the JMainFrame class, but unfortunately i have a button without the icone associated.
    what's wrong with my code ?
    thanks for your help

    Are you sure that the stop.gif image is in the same directory as you .java file. I had problems with the same code and found that when i moved the image file into the same directory as the main java file it worked fine. But i also dont totally understand the problem you are having.
    Andrew

  • Audio and Image question for FCE

    Hello!
    I have this little problem. The music Im importing to my project (mp3) is only playing the baseline of the song, not the actual music...how can I change that? Also, unfortunately the white balance is horrible of the footage...I need to enhance the imgae so it looks a bit brighter, since we shot in the most terrible circumastances...could you let me know how to go about it! I have very little time to finish this.
    Take crae and thanks in advance
    Magdalena

    If the gamma correction suggested by Alchroma makes the black too gray, try using the "Mids" slider below the center color wheel of the 3-way Color Correcter (must be in "visual mode" of 3-way CC filter). The blacks won't be affected and the picture will "come alive".
    After doing so, you may want to also experiment with the Saturation slider as well.
    Also, unfortunately the white balance is horrible of
    the footage...I need to enhance the image so it looks
    a bit brighter, since we shot in the most terrible
    circumstances..
    I've never heard of an mp3 only playing a single instrument from a mix. Are you sure you aren't trying to import a .mid file?
    If it is a .mid file, then open it in Quicktime Pro and export it as an AIF file -as Alchroma has also suggested - with the matching bit and sample rate (typically 16-bit/48kHz).
    Hope this helps!
    AK

  • Using SE friendly urls - Broken Images and other questions

    Im trying to find a workaround for an issue caused when I create SE friendly URLS and i have a few questions too.
    I am making www.mydomain.com/itemid=114
    into www.mydomain.com/shirts/red/114
    question, is keeping the 114 still in the url ok?
    does it matter if its at the beginning or the end?
    like the above or like this www.mydomain.com/114/shirts/red
    and the biggest issue is - how do i work around the image references.
    www.mydomain.com/itemid=114
    on this page, i have an image named LOGO.jpg
    and the reference is just i/logo.jpg which is relative to the page url and the real location is www.mydomain.com/i/logo.jpg
    HOWEVER
    when i use the SE friendly url, its looking for the image in the relative folder - (which is a fake folder of course)
    www.mydomain.com/shirts/red/114
    so on this page its looking for www.mydomain.com/shirts/red/i/logo.jpg
    SO - my question is - how do I override this and force it to ignore the folders references in the url? I still need it to look for www.mydomain.com/i/logo.jpg. I do realize that I could of course reference the images using a full url ....
    meaning instead of using i/logo.jpg i could use www.mydomain.com/i/logo.jpg
    but i would rather not go this route since there are about 20 image references within the template. so if there is a better way to scoot around this I would love to know what it is.
    Thanks in advance
    Sam

    I bet you are using a relative path for your css include
    instead of a root path. So if you have the following in your
    http://localhost/demo/index.cfm
    <link href="../styles/main.css" rel="stylesheet"
    type="text/css" />
    then it will look in the next folder up for a folder called
    styles with a file called main.css
    If you have the same line of code in
    http://localhost/demo/index.cfm/about-our-company
    then it will look for a folder in the root called demo with a
    folder in called index.cfm with a folder in called styles with a
    file in called main.css.
    To solve this you need to reference your style sheet as
    follows:-
    <link href="/styles/main.css" rel="stylesheet"
    type="text/css" />
    Notice how the href begins with a forward slash (/) this
    means to always access it from the webroot. You will need to do
    this for all your internal links as well because they will not
    work, this means links and image references the works.
    HTH

  • Is there a way to do a spelling quiz in captivate using images and not questions as reference.

    Is there a way to do a spelling quiz in captivate using images and not questions as reference. Specifically i want have blank lines underneath an image, where the user looks at the image and types the correct letters to fill in the blank. For example a picture of a dog, with this _ _ _ underneath for the user to fill in, or in some cases perhaps having them fill in the vowel like so "d_g".I must have audio with this , as the students will be able to listen to the audio sound out the word phonetially to help them be able to type it!
    Appreciate any advice! Cheers!

    Hello everybody!
    This widget is great!! Thank you for that!!
    I searched for something like that earlier and made an other workaround:
    http://forums.adobe.com/message/1912430#1912430
    The Javascript did not work in my test. I brought to the "if you reach this slide" feature but it failed.
    Regards,
    Markus

  • How can i create a simple netweaver portal page that shows text and images?

    Hi,
    i have a simple question or maybe it's not so simple.
    I am completly new to SAP Netweaver 2004s Portal. At the moment i'm trying to understand the struture of the whole thing. I already know how to create roles, worksets and pages and i know how to combine the different elements so a user can acces them.
    And now i want to create a simple portal page that shows text and images. Is it possible to create such a simple page with the portal content studio? What iView do i have to use?
    (I just want to create a start page with a welcome text on it.)

    Marc
    Considering that you would any ways go ahead with complex development from this simple start page I recommend create a Web dynpro Iview for your start page (include the Iview in your page).
    For putting the contents use Netweaver Developer studio to build a simple start page application and put your static text on that Iview.
    Please go through the following log after your NWDS development is over - This will make you comfortable for further challenging work.
    http://help.sap.com/saphelp_erp2005/helpdata/en/b7/ca934257a5c96ae10000000a155106/frameset.htm
    Do reward points if this helps and let me know of you want anything more.

  • Images as Buttons and Image Resizing in mxml

    Sorry for all the questions but I've run into a problem when trying to create buttons that are just an image in mxml. When I first tried this I couldn't find a way to get the border around the button to dissapear so it ended up looking like my image had an extra black border around it. Then someone here suggested I just set the buttonMode property of an mx:Image to true which ended up working fine to a point. The problem I'm having is that even if I make the tabEnabled property of the image (that I'm using as a button) true, I can't tab over to it. Is there a way to either get rid of the black borders of a button or to make it so I can tab over to an image I'm using as a button?
    My second question has to do with image resizing. Lets say I have an image of a horizontal line that I want to put at the top of the mxml page, and I want it to extend the full length of the page, even after the user has resized the browser. Is there a way to do that? I've tried putting the width as 100% or giving the image a "left" and "right" value so that presumably it would be stretched to fit within those but nothing has worked so far. Is there no way to do this or am I doing something wrong?
    Thank you for any help you guys can give.

    Of course, sorry about that. So the following is a barebones example of how I currently implement buttons and images as buttons:
    <mx:Button id="facebookButton" icon="@Embed(source='image.png')" width="30"/>
    <mx:Image buttonMode="true" id="button" source="anotherimage.png" enabled="true" click="{foo()}"/>
    And within the image I've tried making the tabFocusEnabled property true but to no avail.
    The following is how I've tried stretching out an image across the whole page:
    <mx:Image source="yetanotherimage.png" width="100%" scaleContent="true"/>
    <mx:Image source="yetanotherimage.png" left="10" right="10" scaleContent="true"/>
    Is this more helpful?

  • Embedding fonts and images for printing (press quality PDF)

    I have a question about a document I have produced in InDesign that needs to go to the printers. They have told me to make sure it is a print ready document with all of the fonts and images embedded. When I convert an indd document for printing 'locally', I normally just use the Adobe PDF presets and select press quality. I thought ID works its magic and does everything required to make it print ready. Is there anything else I need to do regarding fonts and images to make the PDF ready for print?
    Thanks
    Mark

    Thank you.
    As to bleeds, the printers came back and said my pdf is okay but that yes, I need to set an extra bleed edge of minimum 3mm. Do I set this when converting to the print quality pdf or do I set this whilst working in the actual INDD document itself?
    Is the bleed then on every page regardless of the content?
    What are the steps for setting bleed and crop marks. Does that mean when I place an image for example on a page the image needs to hang slightly off the edges by 3mm or am I barking up the wrong tree?

  • Is the BSP extension better than this solution(Text and Image in Button)?

    Hi guys,
    I have a  concept question to decide whether a BSP extension is needed.
    I want to put text and image in htmlb button, and used the solution like below:
    <%
      data image type ref to cl_htmlb_image.
      data: image_string type string.
      create object image.
      image->id = 'back'.
      image->src = cl_bsp_mimes=>sap_icon( id = '@9S@' ).
      image->tooltip = 'Go back'.
      clear image_string.
      image_string = image->IF_BSP_BEE~RENDER_TO_STRING( page_context ).
            %>
            <xhtmlb:toolbarButton id      = "back"
                                  onClick = "back"
                                  text    = "<%= image_string %>" />
    But this solution is not desired by customer, since they don't think it looks nice. So is it possible to create my own BSP extension to get a nicer element?
    Thanks for any hint.
    Regards,
    Liying

    Hi,
    By a nicer element...did you mean to display a better image...or a nicer image ????
    if yes, the you can upload any image you need and then use it here...
    Tell me if you need more information...!!
    Hope this helps.
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • Interval between sound and image!

    Hello all!
    I didn't see that question on the FAQs or in the most recent topics...
    On burnt DVDs via iDVD 5.0.1, I surprisingly notice a half-a-second interval between sound and image (the latter earlier), approaching the end of a long movie (45 minutes), should the movie be captured from the camera as a single clip, or should it be split into several clips in iMovie.
    As if the sound encoding would result in a longer sound tape as the video tape, the movie perfectly begins and the interval progressively installs...
    Any explanation or idea or tip to fix that?

    they may have been in a 12-bit format!
    12-bit seems to be the industry "standard" for camcorders. Both of mine came set to 12-bit. I learned about switching to 16-bit with my first one, because I read the manual. I wanted the best audio.

  • Images (and image folders) in the same folder as Lightroom Catalog?

    I'm just switching over from Aperture 3 to Lightroom 4.  I'm wondering if its ok (or smart) to keep the images (and image subfolders) in the same folder that the Lightroom.lrcat and Previews files are kept in.  I'm trying to better organize my Pictures folder so that there are a whole bunch of separate sub-folders.  Thoughts?

    In Lightroom, there is no specific location where the photos should go. You can put them wherever you want, based upon your storage needs and hard drive setup.
    So, with regards to your specific question, yes you can put the photos in the same folder as where the .lrcat is located, I can't see any harm, but I also don't think you need to do the work to make that happen. You can pretty much leave your photos where they are (which is easier and less time consuming) than moving them to the .lrcat folder, and easier and less time consuming than moving them at all.
    In fact, I strongly suggest you change your thought processes from "Where do I put my photos" to "How can I organize my photos". Now that you are a Lightroom user, you organize your photos from within Lightroom, not by moving them here to there, but by adding keywords and other metadata. Organizing, now that you are LR user, is not folders ... it is metadata. Searching, now that you are a LR user, is not done in your operating system and in folders, it is done in LR by searching for keywords and other metadata.

  • Resizing text and images with actions and keeping it resized for the next slides, how to?

    Hello everybody,
    I searched over the net and in this support section for a solution to my problem, but i didnt find any, so...here I am asking you experts.
    Through a particular use of different actions I make a logo "compose" in the first slide of my presentation (the logo is composed by text and images that interact), then in the second slide i make it resize so it goes 50% of its size and moves down like a TV logo, in the corner of the slide, and I want it to stay there for all the lenght of the presentation.
    It might be a stupid problem, but I didnt understand how to keep it there, 50% of its size and always in that position. If i duplicate the slide I obviously duplicate the 100%-size-logo, not its 50%-size-version, and if i shrink it in order to make it be 50% of its size the text size doesnt shrink so i have to change the text size manually, but the visual effect is imperfect.
    Lets summarize:
    slide 1: text appears, image appears, the text and the image move and "compose" the logo
    slide 2: the complete logo reduces its size to 50% and moves in the lower corner of the presentation, in the place I want it to be for, lets say, 20 slides
    slide 3: i want to have this logo already reduced in size and in its position, in the right lower corner, but if i try to group the different parts of the composed logo and i try to squeeze them the font doesnt change its size, I only squeeze the area that the text occupies.
    Some help please guys?
    Thanks in advance,
    Dom-
    (add: the problem is kind of similar to this: https://discussions.apple.com/message/9179367#9179367 . the idea of making a slide that contains the logo and text in the exact positions they would be after the move and scale actions is good and that was my first attempt, the probem is that it looks impossible to me to create a second "little" version of the logo that looks exactly the same of the first one that i reduced, so i hope there is some way to tell the app to use "the first logo, only resized the way i want", and thats the point where the problem with the size of the text comes out)

    Hi pritam,
    The “maintain proportions of window for different monitor
    resolutions” property will maintain the proportional size of the front panel
    (its x and y sizes) when opened in a different resolution. The front panel
    objects will not be resized and will appear larger (and may not fit inside the
    front panel) when saved in a higher resolution, and moved to a lower
    resolution. You can use the “Keep window proportions” property to achieve the
    same results.
    To have both the front panel dimensions and front panel
    controls scale, you need to have both the above property and the “scale all
    objects on front panel as the window resizes” selected. The labels will not be
    resized by this.
    I tried using both properties on two monitors and noticed
    that the change does not occur when the resolutions between the monitors are
    different. I had to lower both monitors’ resolution to see the change work
    properly.
    Please post back if you have any questions. Have a great day!
    Ryan D.
    District Sales Manager for Boston & Northern New England
    National Instruments

  • Paste selected text AND images from a webpage to Pages/Word?

    I'm a new Mac user (also running virtual Windows XP via vmware fusion), and I know next to nothing about my Mac. Please bear with me if this is something that has been answered (I looked, but didn't find a specific answer for my question...it may be here, but I can't find it).
    On a Windows-based PC, all I need to do is select, copy, then paste into a Word document. All text and images would paste. I can't seem to figure out how to do that in Pages or Word (have MS Office for Mac, too).
    Thanks for any help.

    I suppose I was hoping I could do on my Mac, what I did on my Dell...that doesn't appear to be the case.
    Specifically, I'm talking about clicking/dragging to select what I want (including images), opening a Word document then pasting everying, including ALL selected images. More specifically, at sites with game walkthroughs. I prefer to save them to a document and refer to them offline, if I need to. I actually tried it at 2 different sites (one that hosts their own images and one that does not), with the same results.
    While I was waiting for a response (thank you, so much, by the way), I tried again and actually managed to get the first 3 images (of 60+) to paste into Word. There were blank places in Word, but the invisible images were clickable. In Pages, only the text pasted.
    Tried it every which way, but Sunday, LOL, and nothing worked. If it can't be done on my Mac, then I'll just keep using my Dell (I knew there was a reason I decided to keep it) for that sort of thing and then email them to myself...or try installing my MS Office '07 under virtual Windows.
    Thanks, again.

  • Aperture Exporting JPEG's from RAW: file size and quality questions?

    Hey Everyone,
    So, I'm using Aperture 2 and I've got some questions about exporting from RAW to JPEG. I shoot with a Nikon D70 so original RAW files are 5-6mb in size. After doing some basic post processing when I export the pics at "full size" with picture quality of 11 out of 12 then the resulting JPEG is about half the file size of the original RAW file. For example a 5.6mb RAW becomes a 2.6mb JPEG. The resolution in pixels per inch and and the overall image size remain unchanged. Have I lost picture quality due to the exporting JPEG being smaller in file size?
    My friend who works with me prefers to edit in Photoshop and when he follows the same workflow his saved JPEG from the identical RAW file in Photoshop is minimally smaller in file size, say 5.6mb to 5.3mb. He's telling me that my Aperture edited photos are losing quality and resolution.
    Is he right, are my pics of lesser quality due to being a smaller file size? I've always been told that the quality of a picture is not in the mbs, but the pixel density.
    I've bee told that Aperture has a better compression engine and that the resulting files are of the exact same quality because the PPI and image size are the same. Is that what explains the much smaller file sizes in Aperture?
    I tried changing the picture quality in the export menu to 12 out of 12, but the resulting JPEG then becomes larger than the original RAW at over 7mbs.
    Can someone please help me understand this better? I don't want to lose picture quality if that is indeed what is happening.
    Thanks in advance for your help.

    mscriv wrote:
    So, I'm using Aperture 2 and I've got some questions about exporting from RAW to JPEG. I shoot with a Nikon D70 so original RAW files are 5-6mb in size. After doing some basic post processing when I export the pics at "full size" with picture quality of 11 out of 12 then the resulting JPEG is about half the file size of the original RAW file. For example a 5.6mb RAW becomes a 2.6mb JPEG. The resolution in pixels per inch and and the overall image size remain unchanged. Have I lost picture quality due to the exporting JPEG being smaller in file size?
    JPEG is a "lossy" file compression algorithm. Whether Aperture or PS, *every time a JPEG is saved some loss occurs*, albeit minimal at the 11 or 12 level of save, huge losses at low save levels. Some images (sky, straight diagonal lines, etc.) are more vulnerable to showing visible jpeg artifacts.
    My friend who works with me prefers to edit in Photoshop and when he follows the same workflow his saved JPEG from the identical RAW file in Photoshop is minimally smaller in file size, say 5.6mb to 5.3mb. He's telling me that my Aperture edited photos are losing quality and resolution.
    *Both of you are losing image data when you save to jpeg.* IMO the differences between the apps is probably just how the apps work rather than actually losing significantly more data. The real image data loss is in using JPEG at all!
    Is he right, are my pics of lesser quality due to being a smaller file size?
    I doubt it.
    I've always been told that the quality of a picture is not in the mbs, but the pixel density.
    The issue here is not how many pixels (because you are not varying that) but how much data each pixel contains. In this case once you avoid lossy JPEG the quality mostly has to do with different RAW conversion algorithms. Apple and Adobe both guess what Nikon is up to with the proprietary RAW NEF files and the results are different from ACR to Apple to Nikon. For my D2x pix I like Nikon's conversions the best (but Nikon software is hard to use), Aperture second and Adobe ACR (what Photoshop/Bridge uses) third. I 98% use Aperture.
    I tried changing the picture quality in the export menu to 12 out of 12, but the resulting JPEG then becomes larger than the original RAW at over 7mbs. Can someone please help me understand this better? I don't want to lose picture quality if that is indeed what is happening.
    JPEG is a useful format but lossy. Only use it as a _last step_ when you must save files size for some reason and are willing to accept the by-definition loss of image data to obtain smaller files (such as for web work or other on-screen viewing). Otherwise (especially for printing) save as TIFF or PSD which are non-lossy file types, but larger.
    As to the Aperture vs. ACR argument, RAW-convert the same original both ways, save as TIFF and see if your eyes/brain significantly prefer one over the other. Nikon, Canon etc. keep proprietary original image capture data algorithms secret and each individual camera's RAW conversion is different.
    HTH
    -Allen

Maybe you are looking for