First the text and then the icon in JButton

Hi,
I want to create a button with a String followed by an icon. When I do
JButton aButton = new JButton("Select", new MetalComboBoxIcon());
It puts the icon first and then the string. I want to a create a button that looks like JComboBox.
How would I do this?
thx.

setHorizontalTextPosition(SwingConstants.LEFT).
Check out http://java.sun.com/j2se/1.3/docs/api/javax/swing/AbstractButton.html#setHorizontalTextPosition(int).
Good luck,
-- Scott

Similar Messages

  • TS1717 I just downloaded a song and it only plays the first 50 seconds and then moves to the next song in the list. How can I get it to play the rest of the song?

    I just downloaded a song and it only plays the first 50 seconds and then moves to the next song in the list. How can I get it to play the rest of the song?

    If your country's iTunes Store allows you to redownload purchased tracks, I'd delete your current copy of the track and try redownloading a fresh one. See the following document for instructions:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Otherwise, I'd report the problem to the iTunes Store.
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the item that is not playing properly. If you can't see "Report a Problem" next to the item, click the "Report a problem" button. Now click the "Report a Problem" link next to the item.

  • I am looking for an application that would allow me to open a word doc, and take notes in the .doc using a stylus pen.  I'd then like to convert those notes to text, and then be able to copy / paste those notes into an email.  Does this app exist?

    I am looking for an application that would allow me to open a word doc, and take notes in the .doc using a stylus pen.  I'd then like to convert those notes to text, and then be able to copy / paste those notes into an email.  Does this app exist?  It seems like we were doing these same types of things with Palm Pilots years ago, one would think this would work with iPads?

    I don't believe it will open a Word document, but Writepad allows for handwritten conversion of notes to text and then to email. Might help you some of the way...

  • I have an older iPod that no longer shows up in iTunes or appears to be charging.  When I press the Menu and Select buttons, the Apple logo appears and then an icon of a battery with an exclamation point.  Is it dead for good?

    I have an older iPod that no longer shows up in iTunes or appears to be charging.  When I press the Menu and Select buttons, the Apple logo appears and then an icon of a battery with an exclamation point.  Is it dead for good?

    If it is otherwise working, you can change the battery.  If you want to do it yourself, you can buy the part on eBay and other online sources.  Just make sure you know the type of iPod you have so that you get the right part.
    http://support.apple.com/kb/HT1353
    There are online guides, including the ones on this web site
    http://www.ifixit.com/Device/iPod
    (Note:  Most replacement batteries come with plastic/nylon tools seen in the guides.)
    You can also have a repair business do the work.
    If it is just the battery, if you do a Reset (using the Menu and Select buttons) while it is connect to your computer, I think it should still be recognized by iTunes.

  • When I have headphones plugged into my iphone it says warning'' high volume'' and becomes first a red and then plop a number of red pops but it will not be so for someone else I know. My sound will be much lower than anyone else in the music, and when I t

    When I have headphones plugged into my iphone it says warning'' high volume'' and becomes first a red and then plop a number of red pops but it will not be so for someone else I know. My sound will be much lower than anyone else in the music, and when I talk by phone headset

    Hi! I have the same problem when I use my headphones .
    iPhone 4s England, iOS 6.1.2

  • I downloaded some apps for my ipho in the apptrackr site, the apps are shown in my itunes library but when i try to sync those apps at first it works and then it says an error occur (0xE8008001). How can I sync them without the error?

    I downloaded some apps for my ipho in the apptrackr site, the apps are shown in my itunes library but when i try to sync those apps at first it works and then it says an error occured (0xE8008001). How can I sync them without the error?

    If your phone is jailbroken, we can't help you, as already stated.
    If you're new to this and you're trying to download apps to put on your phone and it is NOT jailbroken, you can't do that.
    You must go through the iTunes app store.

  • Iphone will vibrate for no reason and then a icon will pop up

    iphone will vibrate for no reason and then an icon will pop flashing

    I have a strange, similar problem with my new iphone 3G - it will just start vibrating (mild, not like a full vibrate for an incoming call).  It does this for no apparent reason and appears to last about 30 seconds or so and then stops, again for no reason.  This was happening one time when a call came in (it started before the call).  I answered the call and the vibration made it difficult to hear clearly until it stopped midway through the call.
    Is this normal?

  • Whenever i try and send an imessage to someone that has an iphone it gets stuck at times and won't go through. I then have to send it as a basic text and then it will respond message failed to send what should i do when it does this i need help

    Whenever i try and send an imessage to someone that has an iphone it gets stuck at times and won't go through. I then have to send it as a basic text and then it will respond message failed to send what should i do when it does this i need help

    The use of iMessage depends on both the sender and the receiver having an active data connection. If either of the two connections are interrupted, the message can fail. The sending of an iMessage differs from the sending of an SMS, and if you are having SMS failures, that would be a carrier concern.

  • When I highlight text and then begin to type, the first few letters of what I start to type do not display

    Im on yosemite, and had this problem when I had Mavericks. I have a macbook pro 2014 retina 8gb ram 256gb ssd.
    Let me explain my issue. When I am on google's search bar, I have some text written, i.e. "what is a mac" . When I try to highlight this and write a new search i.e. what is a computer, the text that ends up displaying is "at is a computer". When I look at it as I type, I see that after I highlight and begin to type the new search the first few letters of what I type get highlighted again, and then get overwritten, that is why the first few characters don't show up in the new search I do. Anyone know what the problem is here? How to fix it etc..??
    thankss

    The right-click context search is controlled by the currently active search engine in the Search Bar (not the Location Bar). You can change the Search Bar search engine to specify which single search engine to use.
    *See --> http://support.mozilla.com/en-US/kb/Search+bar
    *See --> http://kb.mozillazine.org/Search_Bar
    The following Add-on will list all installed search engines and allow you to choose the search engine to use during right-click context search without changing the Search Bar search engine:
    *'''''Context Search''''': https://addons.mozilla.org/en-US/firefox/addon/context-search/?src=search
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • How can I get rid of the text and only have icons in the bookmarkfield?

    Earlier the bookmarkfied only showed icons but after the upgrade they show icons and text. How can I get back to only icons so I can have the good old overwiw back?

    umparrothead wrote:
    Test this by going to that folder with both in it and click View/Show View Options. In there, de-check "Show icon preview", and you should see the bordered icons go to default file type icons and the unframed ones remain the same. I honestly don't know how to re-embed the image in the icon data, as it does not play well with the typical paste in on Get Info. Hope this gets a solution rolling, because it's something that's bothered me as well.
    Thanks umparrothead. Yeah, I see what you're saying. The copy and paste into the "get info," is buggy, but it does actually work. I have noticed this when trying to change the icon on an .avi file. The copy paste in "get info," initially shows the paste, but it's not reflected immediately in the files icon in the finder window. I have gotten it to show up as the files icon by moving the file to another folder, (in list view), and then... opening then and closing the folder.
    See here the border on the one file is gone!!
    This opening and closing does not work in the folder the file is in. It only works after moving it to another folder and then opening and closing?!? I think it has something to do with quickview trying to over-ride our choice of icon for it's own choice, whether it be a poster frame on a movie file, or in this case it's own "bordered" view of the photo inside. I imagine it might also show up after a restart, but that is surely far more extreme than the dreaded move file/open folder/close folder/open folder/move file back, trick. uuugghhh...
    This copy paste thing is no solution to be sure. But it does work. I just wish there were some kind of script so I can run it on hundreds of photos at a time...
    Any one else out there with any ideas?!?

  • I am trying to download a form to fill in and it appears in Windows wordpad and there are milions of random characters which |I have to delete before I get to the text and then the test isn't in the format of a form to fill in. Help!!!

    when ever I try to download a form to fill in, the default is windows wordpad and then it appears with millions of characters which I have to delete before getting to the text which is not in the style of a form to fill in.
    How can i get it to download the form as it is?

    What kind of code do you see?
    Is that an HTML file or a PDF file for the Adobe Reader?
    *https://support.mozilla.com/kb/Using+the+Adobe+Reader+plugin+with+Firefox

  • I was sending a text and then the screen went blank with the white apple.  I turned my iphone back on and all my texts  and contacts were gone.  How can i get my text messages back?

    My friend was sending a text with a pic as an attachment and then suddenly, she got a blank screen with the white apple logo and it then shut off.  When she turned it back on, she discovered all her texts and her contacts were missing.  How can she get them back?  She's got a iOS 4.3.5 with a 16GB iPhone 4. 

    Connect to the computer she regularly syncs to, right click on the iPhone's name in iTunes, and choose "restore from backup".

  • Lightroom mobile sync "hangs" - I am trying to sync several small LR collections from my desktop computer.  The first collection syncs, and then Lightroom syncing seems to hang.  It shows "Syncing 150 photos" in top left, but never progresses even after c

    I am using Lightroom 5.5 on OS X.  I have created several small collections with about 180 images and I am trying to sync them via Lightroom mobile for later iPad access.  The first collection syncs properly, and then Lightroom syncing seems to hang.  The label in the upper right shows "Syncing 150 photos" but does not count down.  Opening and closing LR does not restart the process.

    PROBLEM STILL EXISTS...
    I spoke to soon!  I tried adding a couple of more collections to sync.  Lightroom shows "Syncing 814" photos on upper left, but never apparently syncs any.  If I exit Lightroom it notifies me there are 814 images to sync.  When I reopen it seems to pick up and stall where it left off.  These new collections are not posting - this is the same problem as before.
    I am pretty sure there is a serious bug in Lightroom here.  I encourage support to contact me.

  • HT1725 I have two songs Free and Keep Me In Mind and they play the first 8 seconds and then go to the next song.  I can't download them again.  What do I do?

    I have purchased songs and they only play the first 8 seconds and go to the next song.  I can't download it again, Itunes won't let me.  How do I get the songs?

    Try clicking on the Windows menu item then select downloads. 

  • I have yahoo toolbar installed. I tried to clean out some cookies and then my icons (shortcuts) disappeared on the yahoo toolbar. It will not let me open them. How do I restore them?

    There is a "wheel" next to the search bar on yahoo toolbar. Clicking on it usually opens up the icons (such as Facebook, yahoo mail, YouTube, etc). But it no longer opens up any of them.

    thankyou. THANK you.
    thankyouthankyouthankyou!
    sorry about no screenie but the first option worked (at least so far!)
    THANKYOUTHANKYOUTHANKYOUTHANKYOUTHANKYOUTHANKYOUTHANKYOUTHANKYOU

Maybe you are looking for