Once again a boring question?

i am trying to creat a about window such as when one clicks the about photoshop cs by going to the help menu and he gets a window with transparency.
I created a JLabel with an imageicon of gif having transparency and added it to the contentpane of JDialog. I also set the JLabel component to setOpaque(true) but it still shows a white background.
How can I fix it?

This should be in the Swing forum, right? Anyway, I think that you may have to
resort to calling native code to get a truly transparent dialog. The next best thing
to that would be to use Robot to take a screen capture and use that image
as your dialog's background. The is nearly as effective, if you make the window
not movable.
Here's a demo where I use the screen capture effect to make the window disolve.
Just cliick a few times on my ca r:-)
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.io.IOException;
import java.net.URL;
import java.util.Random;
import javax.imageio.ImageIO;
import javax.swing.*;
public class Fade extends JLabel {
    public static void main(String[] args) throws Exception {
        String urlPrefix = "http://www3.us.porsche.com/english/usa/carreragt/modelinformation/experience/desktop/bilder/icon";
        String urlSuffix = "_800x600.jpg";
        URL[] urls = new URL[4];
        for(int i=0; i<urls.length; ++i)
            urls[i] = new URL(urlPrefix + (i+1) + urlSuffix);
        BufferedImage[] images = getImages(urls);
        Robot robot = new Robot();
        images[3] = robot.createScreenCapture(new Rectangle(0,0,800,600));
        JFrame f = new JFrame("fade");
        f.setUndecorated(true);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.getContentPane().add(new Fade(16, images));
        f.pack();
        f.setBounds(0,0,800,600);
        f.setVisible(true);
    public static BufferedImage convert(Image image) {
        int w=image.getWidth(null), h=image.getHeight(null);
        if (w <= 0)
            throw new IllegalArgumentException("Whoa, width is " + w);
        if (h <= 0)
            throw new IllegalArgumentException("Whoa, height is " + h);
        BufferedImage result = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
        Graphics2D g = result.createGraphics();
        g.drawImage(image, 0, 0, null);
        g.dispose();
        return result;
    public static BufferedImage[] getImages(URL[] urls) throws IOException {
        BufferedImage[] images = new BufferedImage[urls.length];
        for(int i=0; i<urls.length; ++i)
            images[i] = convert(ImageIO.read(urls));
return images;
private int currentStage, stages, currentFrame;
int[] target;
int[][] sources, pixels;
public Fade(int stages, BufferedImage[] images) {
super(new ImageIcon(images[0]));
this.stages = stages;
currentStage = stages-1;
currentFrame = 1;
target = getData(images[0]);
sources = new int[images.length][];
sources[0] = (int[]) target.clone();
for(int i=1; i<images.length; ++i)
sources[i] = getData(images[i]);
int N = target.length;
Random rnd = new Random();
int[] rand = new int[N];
for(int j=0; j<N; ++j)
rand[j] = j;
int randUB = N;
int pixelsPerStage = N / currentStage;
int extras = N % currentStage;
pixels = new int[currentStage][];
for(int stage=0; stage<currentStage; ++stage) {
int[] row = pixels[stage] = new int[pixelsPerStage + (stage<extras?1:0)];
for(int j=0; j<row.length; ++j) {
int offset = rnd.nextInt(randUB);
row[j] = rand[offset];
rand[offset] = rand[--randUB];
class MouseTimer extends MouseAdapter implements ActionListener {
Timer timer = new Timer(50, this);
public void actionPerformed(ActionEvent evt) {
if (nextStage())
repaint();
else {
timer.stop();
nextFrame();
public void mousePressed(MouseEvent evt) {
timer.start();
addMouseListener(new MouseTimer());
static int[] getData(BufferedImage image) {
return ((DataBufferInt)(image.getRaster().getDataBuffer())).getData();
public void nextFrame() {
currentStage = stages-1;
currentFrame = (currentFrame+1)%sources.length;
public boolean nextStage() {
if (currentStage > 0) {
--currentStage;
int[] row = pixels[currentStage];
int[] source = sources[currentFrame];
for(int j=0; j<row.length; ++j)
target[row[j]] = source[row[j]];
return true;
} else
return false;

Similar Messages

  • Once again a replacement question

    My iPhone was bought 7 months ago and crashes constantly but since I don't use it much I haven't bothered exchanging it yet. I tried restoring and everything and it is clearly defective and Apple recently said I can exchange it. However, if I wait a few months to exchange it, do you think they will replace it with the 3g iPhone? Engadget said "Original iPhones are totally gone, you won't be seeing those anymore." That makes me think, should I wait to exchange it?

    When Apple performs an exchange it first attempts to exchange like for like - generally only when that's not possible will a newer product be exchanged for an older. In the case of an iPhone we know that the supply of brand new phones is almost non-existent but we don't know about the supply of refurbs. It is worth trying - especially if you are patient and wait a couple weeks past the July 11 release.

  • Can't find the RESET for rejected security questions, once again

    When I log into my iTunes account I'm asked security verification questions & it does not accept my answers. This has happened before when our account was hacked.  I do not want to go to the apple store once again! Can anyone tell me where the RESET button is to reset the security questions?

    If there isn't one on the dialog box asking for the answers, there's none and you need to ask Apple to reset your security questions; this can be done by clicking here and picking a method, or if your country isn't listed, filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (108678)

  • Static methods in interface (Yes, once again!)

    I know there has been many questions about why static methods in interfaces are not allowed. I know it is forbidden by the JLS. But does anyone know the exact reason for this? Is it just a design issue or are there technical difficulties with allowing it?
    I can't think of any reason that it should be impossible to allow static methods in interfaces. I don't even think it would be very difficult to do. More importantly, it could probably be done without breaking existing code and existing JVMs (not too sure about the last one).
    So once again: Was the choice of not allowing static methods in interfaces a design choice or a technical choice?

    A better example of what you are suggesting is surely ...
    interface i {
        static void one();
    class a implements i {
        static void one() {
            // do something
    class b implements i {
        static void one() {
            // do something else
    }What would be the point of ever doing this?
    You cant call i.one() as the method doesn't exist without an instance of an implementing class.
    To actually ever be able to use that method you would effectively be casting an INSTANCE of a or b -> i. If you have an instance of an a or b then there is absolutely no reason for that method to be static.
    If you wanted to implement some sort of class (ie static) behaviour then class a could call its own internal static method from within the 'one' method.
    To get right to the point ... there isn't one. If it gets added to the language (and I can't see it in my wildest dreams) then Sun have lost their marbles, surely?
    Unless someone can give a good example of when it might be correct and useful to do so? I can't even see how it would be a convenience as it is completely unusable, no?

  • Multiplexing once again

    Sorry guys, but I have to stay at the problem of multiplexing.
    I know, you've been handling this topic before, but I am not successfull in solving my problems:
    1- I tryed to burn the project right out of IDVD 6.0.1. After 7 hours of rendering it got hung in the "multiplexing" process.
    2- I followed your advice and tryed to save it as a Image-file and burn it with toast 7 out of this. Once again after half a day of rendering IDVD got stuck by "writing the lead in" (why does a .img-file need to have a "lead in" anyway?!?)
    3- I tryed to delete the thumbnail-files etc as adviced, but I still cant burn the project.
    I am still using 10.3.9, but I dont want to buy Tiger before I am not absolutly sure, that this will solve the problem. Every other program is up to date.
    Another Question: where does IDVD save the rendered files? I am slowly running out of HD space. (still having 23 GB, but every new try costs 3 GB)
    I have to say, I am very disapointed, I did not imaging, apple come with such problems in ILife 06.
    thanks and greetings everyone,
    Kristian
      Mac OS X (10.3.9)  

    Well, thats just great!
    Just as I was about to sove my problems with the DVD burning, my DSL modem quit its job. Now I've been offline a week and it was just like ****.
    A world without internet...
    Sorry, back to my burning issue.
    Yes, I tryed all the steps written in the link above, but it didnt work out.
    I deletet al the dots in fonts book, but the appeared back again. Why do they do this?
    I had also an other idea: what if i install IDVD 5 on my extern HD and try to burn the proojects with this version?
    But, since I installed IDVD 6 a month ago, all my IDVD projects (witch were originally created in IDVD 5) have been converted to be compatibel with IDVD 6.
    Is IDVD 5 able to read this files now?
    Thank you for answering, guys.
    Kristian
    Powerbook G4 1,33GHz   Mac OS X (10.3.9)  

  • HT204088 I bought a gift card in my account and introduced new, but asked me to enter the account once again I do not remember which email account is not recorded it, but I have the card number and PIN for my account Can you help me?

    I bought a gift card in my account and introduced new, but asked me to enter the account once again I do not remember which email account is not recorded it, but I have the card number and PIN for my account Can you help me?

    Help you what?
    We are itunes users just like you.
    Not sure I understand your question.
    Please explain.

  • HT204088 ONCE AGAIN  I BOUGHT IT UNDER "email" = vicfer@**** with many more APPS it is now "vicserfer@**** ...  but the name of visa card is the SAME  for VICTOR FERREIRA

    ONCE AGAIN  I BOUGHT IT UNDER """""""email"""""""" =
    vicfer@**** with many more APPS it is now """"""""vicserfer@****...  but the name of  visa card is the SAME  for VICTOR FERREIRA
    <Email Edited By Host>

    Apple is not here. Apple does not answer questions here. Apple does not acknowledge personal issues with your account here.
    Everyone here is a fellow user and we don't have enough information in this rant to understand what the issue is so as to make recommendations of possible solutions.

  • Purchased the gift card in my account and introduced new, but asked me to enter the account once again I do not remember which email account is not recorded it, but I have the card number and PIN for my account Can you help me?

    Purchased the gift card in my account and introduced new, but asked me to enter the account once again I do not remember which email account is not recorded it, but I have the card number and PIN for my account Can you help me?

    I'm sorry, I do not fully understand your question. However if you are looking for the email address which you have used for your iTunes account, you can find this out by using the "get info" command on any items you have previously purchased from iTunes and navigating to the summary tab.

  • NApple needs to once again actually make a MOBILE PHONE.

    An iPhone 4 or 4S is borderline, but anything bigger than that shouldn't be classified as a MOBILE PHONE.  If it doesn't fit in your pocket comfortably, then it isn't mobile.  If I have to carrying in a holster or something, it isn't mobile.
    I do miss my 4S which "died", but I will never purchase an Apple phone, or any other brand, that is the size of a freaking tablet.  I want a phone-sized phone.  I settled for a Samsung Galaxy S4 Mini.  That purchase was made due to its size, 100% of the reason.  It's an OK phone, but I'd rather have an iPhone.  When Apple decides to once-again manufacture a normal sized cell phone, I'll buy one.  Not until then.
    I'm not going to be a slave to my phone, I'm not going to carry it in a holster, a suitcase, or other bag.  I'm male, so I'm not going to carry it in a purse or anything like that either.  So, if it won't fit in my front pants pocket, I won't be using it.
    When the day comes that there are no cell phones that are a reasonable size, then I just won't have a phone at all.

    Submit your feedback directly to Apple using the appropriate link on the Feedback page:
    http://www.apple.com/feedback
    As ckuan says, no one here has any interest in what type or size of phone you select. If you have any technical support questions about your Apple devices, though, we'd be happy to answer those.

  • I am on windows 7 and I upgraded to 10.0.2 and now it will not open. I have removed firefox completely and uploaded it again and that did not work. So my latest attempt I removed firefox 10 again and uploaded the beta version and once again nothing.

    I am on windows 7 and I upgraded to the newest verison of firefox and now it will not open. I have removed firefox completely and uploaded it again and that did not work. I then made sure it could get through my firewall and that did not work. So my latest attempt I removed firefox 10 again and uploaded the beta version hoping that would do it and once again nothing. It will not open at all. Please help - is there a live chat or a number to talk to someone at Firefox?

    I think when uninstalling you may also have to choose (tick) to delete the preferences and other personal data like the bookmarks, stored passwords etc. to erase completely. If you are installing afresh, please try right-clicking on the file and '''Run as administrator''' to install. And when uninstalling, please also make sure choose to delete all data and also manually delete any '''Mozilla''', '''Mozilla Firefox''' or '''Firefox''' from %appdata%, %localappdata% and %programfiles%. You can open a location by typing for eg. %appdata% in the '''Run''' box (Windows key + R). You may also have to check the '''VirtualStore''' folder in %localappdata%. Files in the VirtualStore can be problematic. I think a clean installation may help.
    [https://www.mozilla.org/en-US/firefox/new/ Firefox]
    [http://kb.mozillazine.org/Installation_directory Installation Folder]
    [http://kb.mozillazine.org/Profile_folder Profile Folder]
    Please note that using system restore would usually damage the Firefox installation.

  • MDT 2012 deploy OS from USB external drive failed - need to unplug and plug it once again

    We are using MDT 2012 and deploying Windows 7 using media (USB external hard drive). We can successfully deploy Windows 7 32 bit using this method but there is a problem with deploying Windows 7 64bit. This problem appears only on HP EliteBook 840. We can
    boot into WinPE 64 bit and can start proper task sequence, all image is applied then after restart, before logon screen appears there is an error saying that cannot find litetouch.vbs script. After clicking ok, I can logon to Windows and there is no usb external
    drive recognized. But when I unplug and plug usb drive once again it is recognized by Windows and can be used. I can see that Windows install some drivers just after plug it again
    I checked BIOS looking for some USB power options - there is no such settings. And 32 bit deployment works ok. So this is not a case. Looks for me like a problem with proper usb drivers for 64 bit. I download all drivers from HP website (driver pack and
    drivers only for USB 3.0). We are using make and model matching in MDT - works ok for all the rest hardware models. Any idea how to troubleshoot it?

    Not sure what's going on here. Is this a USB "Flash" drive or a USB "Hard Drive". There *Is* a distinction.
    I *thought* that MDT would copy itself to the c:\minint\scripts folder to continue installation.
    Next time, when you see this error, Press Shift-F10 to get into a cmd.exe prompt. Can you find litetouch.vbs on any of the drives? Does the USB Drive appear?
    IF in fact, the USB Drive is not appearing after the 1st reboot, then you have a problem. Why did the USB 3.0 driver not install. Check the Driver Installation Logs to verify.
    Keith Garner - keithga.wordpress.com

  • Report is not getting refreshed after changing prompts once again?

    HI,
    I am running some webi and deski reports using webi sdk also i'm handling the prompts of
    report.
    Problem is that if i ran the parametrized webi or deski report then my application shows the prompt page
    then i fill all the prompt for the report it shows the data for selected prompt values.
    But if i once again changed prompt values it shows data of previously selected prompt values not for
    the currently changed prompt values. means reports not getting refreshed.
    sometimes its work correctly.
    What will be problem?
    How can i resolve this issues?
    Please help me
    Thanks in advance
    Harshad

    The workflow is:
    1. Refresh
    2. Set Prompts
    3. Get View.
    then repeat.
    Are you refreshing before setting prompts?
    Sincerely,
    Ted Ueda

  • Every time I update LR to a new version I seem to need a patch to make it work..... once again here I am SOS! I've just update LR to the 5.7 version and It wont let me start it: The application was unable to start correctly (0xc000007b).

    Every time I update LR to a new version I seem to need a patch to make it work..... once again here I am SOS! I've just update LR to the 5.7 version and It wont let me start it: The application was unable to start correctly (0xc000007b).

    Your system is missing a couple DLLs that LR needs, but the fix at Adobe is to copy them to the LR folder which gets replaced for each install, so you have to redo it after each LR install.  It would be worth documenting the process and saving the DLLs so you don’t have to ask about it each time:
    http://helpx.adobe.com/lightroom/kb/error-unable-start-correctly-0xc00007b.html
    You might also use the AIO210 program to add them as detailed in this YouTube video—maybe this is a more permanent fix, but since the files are from media-fire be very careful about what you do so as not to install a virus on your computer. 
    I’d scan the downloaded ZIP you download with whatever virus and internet security software you have and don’t be fooled by extraneous popups you might see during the download process.  I was able to download the aio210.zip after authorizing one Captcha window and closed at least one bogus popup trying to get me to install other software.  I also scanned the downloaded zip with two virus scanners and both said it was clean.  Here is the YouTube video, where the link to the ZIP to download is in the description once you expand it:
    https://www.youtube.com/watch?v=vlT0N2CX50g

  • I tried upgrading to MountaIN lION HOWEVER i WASNT ABLE TO Install.  I then tried reinstallling Snow leopard but once again it will not let me install stating there are errors on the disc.  I have run disc repair on disc utility but it wont allow me

    I was told to reinstall Snow leopard which I did .  More troubles! It then came up cannot iinstall as there are errors.  Tried going into disc utilities and repair but once again it stated iin red I cannot proceed.  can anyone help me here.  Before this was happening my system was slowing right down with the beach ball making an apearance after tapping the mouse or typing text.

    So you are trying to reinstall Snow Leopard?
    In order to do that, you need to erase your hard drive - you cannot go back to an earlier system without erasing. Make sure you back up your files first. Then insert the Snow Leopard install disk, and restart while holding down the C key. If that does not work, insert the install disk, go to System Preferences > Startup Disk and highlight the install disk > click on restart.
    Once you are booted into the install disk, go past the language selection and then to Utilities in the menu bar. Use Disk Utility to repair the drive (just in case), erase it and then install. After that, eject the disk and update to the latest 10.6.8.

  • How can I buy it on my Apple ID so I can use Recovery to put my MBP to function once again? Help D=

    My MBP just failed, bought it from a friend and dont have an Apple ID with Lion, Lion is no longer on the App Store so, how can I buy it on my Apple ID so I can use Recovery to put my MBP to function once again? Help D=
    Or what else could I do? I don´t have any USB to reinstall the OS and my DVD Unit is death, but it seems I can reinstall over Wi-Fi if Im able to link an OS X Lion license to my Apple ID

    You would need to call Apple Sales (USA 1-800-MY-APPLE) and purchase a redemption code for Lion.

Maybe you are looking for

  • Want to add by code a short cut of a pdf file to an rtb in vb6, using adobe reader 9

    Using vb6 code, I add a pdf file from a list to a richtextbox. On versions 5 & 6 a "short cut" is placed in the rtb which is what I want so that the document can be double-clicked to view at a later date. On versions 8 & 9 the file opens automaticall

  • Zen micro pr

    Bought a zen Micro a while ago and have recently encountered a couple of problems: . The radio transmitter is really poor-just crackles and cant hear anything despite being on a national station (R). Thought maybe it was because I was in the centre o

  • DBMS_SCHEDULER.create_job Procedure will not fire

    I have created a procedure that does not seem to want to run create or replace procedure sched is BEGIN   DBMS_SCHEDULER.create_job     job_name        => 'my.MAILER',     job_type        => 'PLSQL_BLOCK',     job_action      => 'BEGIN MAILER;  END;'

  • Why won't pictures imported from hard drive Pictures folder show full size in iPhoto?

    I imported the photos from my Mac's "Pictures" folder into iPhoto. Some of the pictures I imported just appear in iPhoto as a tiny photo about an inch tall, surrounded by black. If I open them directly from the Pictures folder on my Mac, I can make t

  • Location services not turning on

    my iphone3gs wont let me turn on location services can anyone help ?