How can I remove the gradient background & border from an ImageIcon?

Problem1: Hey, I have a program that randomly displays a stop sign that I'm supposed to click on as fast as I can. And I created a gif with the stop sign, with it's background transparent. But when I added it to my application using an ImageIcon, whatever's supposed to be transparent in the gif is shown up as a gradient. There's also a border around the ImageIcon. Is there any way to get rid of these? Thanks
Problem 2: I also have a background for my entire application, but it stays the same size no matter if I maximize the application or run it on a different screen size. Is there any way to scale a background (it's animated), to the full screen?
Thanks again! It's for a project due tomorrow. I'm doing final touches.
Here's some of my code. It's really long, so I took out what I think is related. JButton stopSign1 = new JButton();
this.getContentPane().add(stopSign1,null);
         ImageIcon stopSign = new ImageIcon("Dead_End.gif");
         stopSign1.setBounds(new Rectangle(randomX, randomY, 150, 150));
         stopSign1.setIcon(stopSign);
         stopSign1.setVisible(false);

Try stopSign1.setBorder(null);
stopSign1.setOpaque(false);Also, in future, post Swing questions in the Swing forum.

Similar Messages

  • How can I remove the blue background from my PDFs files

    How can I remove the blue background from my PDFs files

    Which tutorial?
    Answers are in your HTML and CSS code.  What is the link to your online test page?
    Nancy O.

  • How can I remove the old apple id from my ipod 4rth gen to log in my new apple id ? (my old apple id keeps showing automatic I can't put my prefer new apple id)

    How can I remove the old apple id from my ipod 4rth gen to log in my new apple id ? (my old apple id keeps showing automatic I can't put my prefer new apple id)

    - Note that apps are locked to the account that purchased them.
    - To update apps you have to sign into the account that purchased the apps. If you have apps that need updating purchased from more than one account you have to update them one at a time until the remaining apps were purchased from one account.

  • How can i remove the previous icloud acount from my iphone4?

    I recently purchased a second hand iphone4 not jailbroken and i already restored it to factory settings but i can't log in to icloud using my account because it states that  "The maximum number of free accounts have been activated on this iPhone". How can i remove the previous icloud acount from my iphone4? Hope someone could help me on this. Cheers! :)

    Hi,
    My dad gave me his old iphone as he got an upgrade. I can't seem to change his icloud account to mine. I'm getting his updated calender and his mail - and there seems to be some confusion between both our accounts. He seems to be acquiring some of my contacts - some of which have names which have led to some probing questions... So basically this needs to be sorted out! How can i delete his account from the iphone but not his whole icloud account? he would not be happy if i did this...
    Sophie

  • How can I remove the authorize 5 computer from my iTunes?

    How can I remove the authorize 5 computer from my iTunes?

    Deauthorize one computer
    Open iTunes on the computer you want to deauthorize.
    Choose Store > Deauthorize This Computer.
    You might need to show the menu bar to see this option in Windows. In earlier versions of iTunes, you can access this option from the Advanced menu.
    Enter your Apple ID.
    Click Deauthorize.
    If need to deauthorize your computer but you can't access it, you need to deauthorize all computers. After you authorize 2 computers, you'll have the option to deauthorize all computers for your Apple ID. You can deauthorize all computers once per year.
    Deauthorize your computer using iTunes - Apple Support

  • How can I remove the Emergency Call button from the lock screen Xperia Z2

    How can I remove the Emergency Call button from the lock screen on my Z2 phone

    Alecuk wrote:
     It's like the stupid bold font on the hours or the lock screen clock - i've never seen anything so stupid in all my life.
    it's things like this that make a good phone c.r.a.p.
    Hi, well if you do a little bit of research on the forum you will be able to see that you can & very easily able to change the font on the clock 

  • How can i remove the terms and conditions from my app store on iphone 5s ?

    How can i remove the terms and conditions from my app store icon on iphone 5s

    Hello mrh1962,
    Thank you for providing the details of the issue you are experiencing with accepting Terms & Conditions on your iPhone 5s.
    First, I recommend restarting your phone and then resetting if it's still not working:
    Restarting your device
    Press and hold the Sleep/Wake button for a few seconds until the red "slide to power off" slider appears, and then slide the slider.
    Press and hold the Sleep/Wake button until the Apple logo appears.
    Note: Reset your device only if you are unable to restart it.
    Resetting your device
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    You can find the full article here:
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/ht1430
    If you can access your home screen, I also recommend verifying that cookies are not blocked and private browsing is turned off in Settings>Safari:
    iPhone User Guide - Safari settings
    http://help.apple.com/iphone/7/#/iph3d7aa74dc
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • How can i remove the end pice/pin from my headphones out of my computer?

    how can i remove the end pice/pin of my headphones out of my computer?

    IF you cannot pull it out with your finger tips, you need to take the machine in for service to an Apple Store or AASP. Doing this type of work yourself could seriously damage the computer so it's best left to professionals.

  • How can I remove the Quick Launch area from a SharePoint site

    We have a SharePoint site that includes a Quick Launch area by default.  We know how to add and delete items from the Quick Launch area but how can we delete the Quick Launch space (this would shift the main body portion over to the left and taking
    over the space once occupied by the Quick Launch area)?

    Hi,
    You can refer the below urls.
    http://sharepointpolice.com/blog/2010/04/07/hiding-the-quick-launch-in-sharepoint-2010/
    http://chrisstahl.wordpress.com/2010/03/15/hide-the-quick-launch-in-sharepoint-2010/
    http://sharepointpromag.com/sharepoint/four-ways-add-or-remove-quick-launch-menu-control
    Please remember to mark your question as answered & Vote helpful,if this solves/helps your problem.
    s p kumar

  • How can I remove the thin black border of Flash movie when viewed in a browser?

    There is a thin border at the top and left margins of my Flash movie when the .html is viewed in a browser. How can it be removed?
    Here's the movie.
    One solution suggests replacing some code, but the code they suggest replacing doesn't even exist in my html file.
    I have found questions similar to mine being asked all over different forums, but their solutions either don't work, or like the above, don't really apply. For such a common problem, finding the solution is getting a little frustrating.
    I'm using Flash CS3 on a Windows PC rrunning XP professional.

    Okay, I found the answer. It turns out that when I made the buttons in Flash (so the movie would have clickable links), the default stroke color was set to black. Change it to white and the outline is gone.
    As for appearing only on the top and left of the movie - for some reason the bottom and right is being cropped a bit when it's placed in to the html page. But that's a topic for a different discussion.

  • How can I remove the junk mail folder from appearing in my macbook mail program?

    Hi all
    Can someone please tell me how I can remove the "junk" mailbox from showing in my mail program on my macbook? It wasn't there before and I would like it removed. I've attached a screen shot to be clearer in my request.
    Thank you!

    Hey PrincessJasmine,
    I see that you wish to get rid of the Junk Mail folder from your sidebar in Mail on OS X. I have an article for you that will explain how to do this:
    Choose Mail > Preferences, then click Junk Mail. Make sure “Enable junk mail filtering” and “Mark as junk mail, but leave it in my Inbox” are selected.
    Mail (Yosemite): If junk mail filters aren’t working correctly
    https://support.apple.com/kb/PH19190
    Thanks for being a part of the Apple Support Communities!
    Cheers,
    Braden

  • How can I remove the forced U2 songs from my iphone without synchronizing?

    Hello. I have about 100 songs merely on my iPhone, nowhere else. Apple moved somehow these U2 songs on my iPhone without permission. Now it is like having an undesired cupboard standing in the middle of my living room and I cannot remove it. A synchronizing would also delete my 100 songs. What can I do? Please help!

    Hello Pammander,
    Thank you for using Apple Support Communities. 
    The following article provides information on how to remove the U2 gift album:
    Remove iTunes gift album "Songs of Innocence" from your iTunes music library and purchases - Apple Support
    Regards,
    Jeff D. 

  • How can i remove the measurement info bubble from displaying while using patch tool?

    When removing unwanted parts of an image or repairing older images, the tool most used by me is the patch tool. When I select a patch and move a bubble with measurements of how far I've moved this patch pops up and ALWAYS seems to be in the way. Some areas to repair are extremely magified and can make or break an image looking natural or not. The darn measurement bubble seems to place itself in the worst possible location for exact placement of small elements. How can I turn this info bubble from popping up as I'm not why it's even there?

    You can turn it off under Photoshop (Edit)>Preferences>Interface by setting Show Transformation Values to Never

  • How can we remove the "Attack Site" warning from our webpage?

    We host several domains with Dreamhost. (1st mistake)
    Our account was hacked and is being resolved.
    We have taken our site down.
    When searching our url, our prospective customers will see an Explorer message which reads a Dreamhost message stating this website has been "voluntarily parked". Site coming soon.
    In Firefox, the Attack Site message in red is still showing. Can you please remove the message as our website is not available for public viewing?
    Thank you.
    RJ

    I get a status 200 with a message from the site that it is under construction. If I am using the correct URL (www.usana2013.co.za) maybe you need to clear your Firefox cache.
    The database of attack & phishing sites is not directly maintained by Firefox.
    See also
    *http://www.mozilla.org/en-US/firefox/phishing-protection/firefox2/
    *http://www.mozilla.org/en-US/firefox/features/#advancedsecurity
    *http://en.wikipedia.org/wiki/Google_Safe_Browsing
    ** http://www.google.com/tools/firefox/safebrowsing/
    **http://safebrowsing.clients.google.com/safebrowsing/diagnostic?client=Firefox&hl=en-US&site=http://www.usana2013.co.za

  • How can I REMOVE the Yahoo! tab from the menu bar? Each time I open Firefox, I get the gialogue box asking if I want to make yahoo the default and each time I respond no and check the do not ask this question again.

    I am tempted to remove Ff4 and revert to 3.X if I cannot fix this problem. The question (statement) has all pertinent details already included

    '''Hello peacefultrev,'''
    I believe from your question you wish to remove the window title-bar, while keeping the menu bar available.
    I have two solutions for you to try. One requires no plugin and the other requires the installation of a plugin.
    '''No plugin option:'''
    This option hides the the window title while also removing the menu bar. The menu bar can then be reactivated and viewed simply by pressing "Alt" which shows the menu bar until you click away from it. To do this:
    # Right click on the tab bar and disable "Menu Bar".
    # Whenever you which to use the menu bar, tap "Alt" on your keyboard.
    # When you click away from the menu bar the windows title will disappear until you tap "Alt" again.
    '''Plugin Option:'''
    You can download this plugin called [https://addons.mozilla.org/en-US/firefox/addon/hide-caption-titlebar-plus-sma/ Hide Caption Titlebar Plus] which can be customized to suit your needs. I cannot provide support on this plugin as I have not used it myself.
    I hope one of these solutions will suit your needs.
    Mattlem

Maybe you are looking for