Making a component half way transparent(not fully opaque or nuopaque)

Is it possible to make a component (frame, panel etc) half way transparent, I know that its possible to make it fully transparent but i would like to know of a way to go half way, thanks.

I saw something recently about making a JFrame transparent in another question. You need to use a third party package. Sorry, I don't remember the posting. If you try searching the forum you might find it again. You can use my id as one of the keywords.
Otherwise for JComponents you need to do three things:
a) make the component non-opaque
b) set the background color of the component using a Color object that has an "alpha" value specified.
c) however you can't just set the background since it won't automatically be painted, so you need to override the paintComponent() method of the component to paint the background yourself. Something like:
g.setColor(getBackground());
g.fillRect(0, 0, getWidth(), getHeight());
super.paintComponent(g);Or instead of using a background with an alpha value I think you can use something like this to paint the background:
Graphics2D g2 = (Graphics2D)g;
AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha);
g2.setComposite(ac);
g2.setPaint(getBackground());
g2.fillRect(0, 0, getWidth(), getHeight());Don't know which approach is better.

Similar Messages

  • Music sync stops half way through "not enough access privilege to complete"

    syncing entire music library. it stops halfway through and i get and error message "Attempting to copy to the disk image X Iphone failed. You do not have enough access privilege for this operation"
    i close that window and there is another error "iTunes could not copy "X Song" to X iPhone because an unknown error has occurred. (-5000)
    Any ideas on how to get this rig running as advertised? Thanks

    Try to Reset the iPad:
    From the Home screen double tap the Home button to view the multitasking bar at the bottom. Tap and hold an app at the bottom till the icons wiggle with the minus button visible. Tap the button to close all apps then tap the Home button to get back to the Home page. Press and hold the Sleep button till you see the Slide to power off message and power it off. Once powered down completely press and hold the sleep button till the Apple icon appears.

  • How to make a transparent object fully opaque while keeping the same color appearance?

    for a single object in a document.
    I will greatly appreciate your help.

    Flatten transparency on a copy and take the color with the eyedropper? Any better way?

  • Making simple Cross desolves at the end of still photo clips from my library. Not making a clean disolve beteen. Single frames from the previous clip are flashing half way through the desolve. Did both a drag and drop and insert disolve.

    Making simple cross desolves at the end of still photo clips from my library.
    Not making a clean disolve between clips.
    Single frames from the previous clip are flashing half way through the desolve.
    Did both a drag and drop and insert disolve.

    Making simple cross desolves at the end of still photo clips from my library.
    Not making a clean disolve between clips.
    Single frames from the previous clip are flashing half way through the desolve.
    Did both a drag and drop and insert disolve.

  • I am using final cut express. It seems that any clip over a certain length, say 5 min, does not fully transfer! All shorter clips are perfectly fine. Is there some reason why longer clips are not fully transferred? (a half blue circle shows up on the tran

    I am using final cut express 4. It seems that any clip over a certain length, say 5 min, does not fully transfer! All shorter clips are perfectly fine. Is there some reason why longer clips are not fully transferred? (a half blue circle shows up on the transfer list, indicating that the clip was not fully transferred. When I check in the capture scratch folder, sure enough the whole clip is not there!
    Is there some glitch in final cut express that only allows short clips to be transferred in full?

    Thanks for the reply. I'll try to answer all the questions (I am a relative novice). Your help is appreciated.
    By the way, the other reply I received suggested the following:
    In Final Cut Express>System Settings>Scratch Discs make sure the Limit Capture/Export File Segement Size To: is not checked.
    I did this and it was already unchecked. So this is not the answer...
    The strange thing is, I have been logging and transferring with FCE for 2 yrs without any problems at all with shorter clips, but have come up against the problem with long clips (over 5 or so min)  the whole time. I got around it by simply making sure I stopped recording after less than 5 min while shooting footage. OR if I accidentally got a long clip, I import into imovie and then import into FCE. Not very streamline and I worry about compressions altering quality!
    I am now trying to import a 20 min and a 17 min clip and it only transfers around 3 minutes of each, I have re-tried several times and it happens repeatedly. The blue circle in the transfer list shows up as a half blue circle instead of full. Clip cuts off after 3 or so minutes.
    ANSWERS
    how you are ingesting the files
    From external flash drive connected directly to mac using FCE.
    the format of the source footage
    digital via ext flash memory. Frame size :1929X1080 / 25fps
    what camera shot the footage
    SONY HXR NX5
    how you are connecting to the computer
    from flash memory directly via usb
    what version of FCE you are using
    4
    what OS your computer is running
    10.6.8
    what model Mac
    macbook Pro intel Core i7
    what drive you are using for Capture Scratch
    3TB external drive (plenty of room left)

  • I rented a movie via Itunes on  my PC but half-way through the download recieved a "An unknown error has occured (-50)" notification. This is not my first rental, and I have verified my network and all connections to be good. Will I still be charged?

    I rented a movie via Itunes on  my PC but half-way through the download recieved a "An unknown error has occured (-50)" notification. This is not my first rental, and I have verified my network and all connections to be good. I have rebooted Itunes and resumed the download of the movie only to receive the same error code. Has the movie file been corrupted? Can I recover the rental even though the time has elapsed? Will I be charged?

    Did you figure this out?  I haven't rented a movie in this new iTunes yet and saw one tonight I wanted to rent.  Same fricken thing is happening to me.  I hate this new iTunes, and I really hate that there are problems like this....why the heck do they have to fix something that isn't broken and break it?  This just really stinks.

  • I recieved a notice that there was an update for Elements 13 but when I try to install it it stop's half way through then I get the error message that "updates could not be applied" I have tried several times and it continues to give me the error. What is

    I get a message that an update is available and when I install it the update stops half way through and I get the error code: U44M1I210 for Camera Raw and Elements 13.1 updates. I get the message "UPDATES COULD NOT BE APPLIED" Can someone help with this? Thank you. David

    drmeyers381
    Thanks for the follow up.
    Is your Premiere Elements 13 on Mac computer?
    I have not seen much in the way of alternatives coming from Adobe on the Premiere Elements 13.1 failed updates.
    But there seems to be several discussions on U44M11210 in the CC products...one
    Update failure. (U44M1I210) | Adobe Community
    You could try the uninstall, free ccleaner, reinstall with antivirus and firewall(s)  and then try for the Help Menu/Update for 13.1..
    If Mac, https://www.piriform.com/mac/ccleaner
    If Windows, CCleaner - PC Optimization and Cleaning - Free Download
    The CC people seem to have the advantage of an online download of their update as well as the one via the Help Menu/Update.
    Premiere Elements does not have that perk - update only via Help Menu/Update.
    Please review and consider and please let us know of your progress as your schedule permits.
    Thank you.
    ATR

  • On my ipod touch I'm not too sure how I uploaded a album onto my ipod from my laptop. But, now there is no way to delete the album full of pictures. What do I do? I only gotten it a while ago and not fully sure how to work it. Help?

    On my ipod touch I'm not too sure how I uploaded a album onto my ipod from my laptop. But, now there is no way to delete the album full of pictures. What do I do? I only gotten it a while ago and not fully sure how to work it. Help?

    http://support.apple.com/kb/HT4236

  • Ipod will not sync to itunes, just stops half way and freezes the computer

    my ipod has suddenly stopped syncing to itunes half way through and freezes the computer. it is not the songs because they sync to my phone. how can i fix this?

    Have you tried plugging the Nano into another available USB port or using another USB sync cable?  Does it seem to be freeze when syncing the same track?
    I assume iTunes is up to date (10.7 at the time of this writing).
    See here for more troubleshooting as well.
    iTunes for Windows Vista or Windows 7: Troubleshooting unexpected quits, freezes, or launch issues
    B-rock

  • Ipod touch will not restore it get half way then freezes

    ipod apps were unreponsive so i restored ipod now it will not restore how long should it take it has been restoring for 5 hours is half way and looks as if it has frozen ?

    have a look @ this support article.

  • My iPod is playing songs half way through and not at the beginning?

    Okay, so I will be listening to a song like "Yellow Submarine" by The Beatles and will get the urge to change the song to a different band and song half way through of listening to it. After listening to the new band and song and like a month goes by I will go back to The Beatles song and it will begin where i left off and not in the beginning like it used to. How can i fix this because it makes me mad that it starts half way through and not in the beginning?

    Hello uhmcookies,
    And welcome to Apple Discussions!
    I believe the "Remember playback position" is enabled for these songs in iTunes. This option will ensure that wherever you leave off in a song is always where it will be picked up off at. This is a nice feature for audiobook tracks, but not music.
    Anyways, you can disable it by removing the check mark next to this option from under the track's Options tab in iTunes. You can access this tab by right->clicking on the track and choosing "Get Info" from the menu.
    Hope this helps.
    B-rock

  • I have IMac 10.7.5 Lion I use I forgot the password and I did a few fixes from the we sites, which did not work and now I can not get the computer to reboot the gray screen comes on and if a shift c I get a load bar and it goes half way and help

    I have IMac 10.7.5 Lion I use I forgot the password and I did a few fixes from web sites, which did not work and now I can not get the computer to reboot the gray screen comes on with the apple and if a shift+c, I get a load bar and it goes half way and stops, I can get into the black screen area with the hard drive info
    I did the following:   mount -uw /    rm/var/db/.AppleSetupDone    shutdown/uses/us  reboot Ok I know I should not have, but now I need help to reboot and hopefully not lose everything on the desk top, Linda Markle

    You did the wrong things. In the future it's a good idea to remember not to do something when you don't know what you are doing and what happens when you do it.
    Forgot Your Account Password
    For Lion, Mountain Lion, or Mavericks
        Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
         When the menubar appears select Terminal from the Utilities menu.
         Enter resetpassword at the prompt and press RETURN. Follow
         instructions in the dialog window that will appear.
         Or see:
           Reset a Mac OS X 10.7 Lion Password
           OS X Mountain Lion- Reset a login password,
           OS X Mavericks- Solve password problems,
           OS X Lion- Apple ID can be used to reset your user account password.

  • My macbook pro will not boot. It gets the grey screen with the apple until the bar is half way across and then shuts down. The only screen I can get to is in safe mode and I don't know what to do with that

    my macbook pro will not boot. It gets the grey screen with the apple until the bar is half way across and then shuts down. The only screen I can get to is in safe mode and I don't know what to do with that

    Mac OS X: Gray screen appears during startup - Apple Support

  • 2009 macbook pro does not boot, restarts half way through boot. Has hard drive crashed?

    My macbook pro 2009 froze and shut off. I restarted it and only boots half way then it restarts on its own. I have tried entering cmd R to verify disk and permissions. My disk in unmounted and the SMART status says not supported. Error was found but while trying to repair it said: Disk utility stopped repairing. Disk utility can't repair this disk. Back up as many of your files as possible , reformat disk, and restoer your backed up files. I have tried to restore from time machine and it wont let me do that either. Has my hard drive crashed?
    Also, About 2 months ago i installed new RAM so I now have 8GB instead of 2GB and everything was working well up to that point.

    I am having the exact same issue. I can only log into the system in safe mode. Holding down the Shift key when turning the machine on, until the log window appears.

  • Cant restore iphone 3g 4.2.1 it would load half way threw then say unknown error why it is not working?

    cant restore iphone it would loa half way threw then say unknown error why is it not working and its a iphone 3g 4.2.1

    What is the exact error message you're getting?

Maybe you are looking for

  • 9.2.0.6 , windows nt, yes or no?

    Hi, search the html db to see if it is compatible with 9.2.0.6 for windows nt (32 bit) and really did not see a clear answer. yes, no...I saw there was a patch, but not for the window nt side. Thanks for any help! Patrick ps: Way to go at Openworld!

  • Max no of columns

    Hi, What is maximum no of column in Oracle 8i. Thanks, Kumar.

  • Problem with import of split tables.

    We are creating copy of our  production system. The system copy has a change of Operating system from HP-UX to Windows X86_64 and is also has unicode conversion. We followed the following steps: 1) Performed post copy steps and pre-unicode conversion

  • Work Item Objects and attachments

    Hi, We are working for the travel expenses related workflow scenario where we are able to see the employee trip details under the objects and attachments. This happens with the method 'DISPLAY' which is a default method and which is used to display t

  • How to list the JAR files loaded into the Oracle Database ?

    How to list the JAR files loaded into the Oracle Database ?