Setting a Icon to Filedialog in windows

Does a FileDialog whose parent is a Frame have a icon(Frame icon) displayed on it ,on windows platform.?
Regards,
Kdsouza

It's a routine matter to create a GIF file with transparent pixels:
import java.awt.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;
public class GIFExample {
    public static void main(String[] args) throws IOException {
        boolean ok = ImageIO.write(createImage(), "gif", new File("test.gif"));
        System.out.println("success=" + ok);
    static BufferedImage createImage() {
        IndexColorModel cm = createIndexColorModel();;
        BufferedImage im = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED, cm);
        Graphics2D g = im.createGraphics();
        g.setColor(new Color(0,0,0,0)); //transparent
        g.fillRect(0, 0, 100, 100);
        g.setColor(Color.RED);
        g.fillRect(0, 0, 50, 50);
        g.setColor(Color.GREEN);
        g.fillRect(50, 50, 50, 50);
        g.dispose();
        return im;
    static IndexColorModel createIndexColorModel() {
        BufferedImage ex = new BufferedImage(1, 1, BufferedImage.TYPE_BYTE_INDEXED);
        IndexColorModel icm = (IndexColorModel) ex.getColorModel();
        int SIZE = 256;
        byte[] r = new byte[SIZE];
        byte[] g = new byte[SIZE];
        byte[] b = new byte[SIZE];
        byte[] a = new byte[SIZE];
        icm.getReds(r);
        icm.getGreens(g);
        icm.getBlues(b);
        java.util.Arrays.fill(a, (byte)255);
        r[0] = g[0] = b[0] = a[0] = 0; //transparent
        return  new IndexColorModel(8, SIZE, r, g, b, a);
}Notes: I took the ICM created for BufferedImage's type TYPE_BYTE_INDEXED (which is opaque) and made the first color transparent.
There are also ICM constructors where you can indicate MAGENTA is really transparent, for example, which is time-honoured, but I find
that a hack.

Similar Messages

  • Set the icon of the forms window !!

    hallo !!
    please help me in that topic !!
    i wanna change the icons in my project (window icon ,button icon , .....)
    with the property icon filename ...
    but
    1- i don't know what is the default path ??
    2- how to place all icons in the application folder
    " what application folder " ?????
    3- how to add the same path into registry ?????
    4- i don't find the d2kwutil.pll library "i use forms 9i"......
    please help me ,,,, to solve that problem !!
    yours
    Shenouda

    Shenouda,
    you are starting to confuse people by submitting the same question over and over again. The basic information is that you are on Forms9i. This means that setting icons teh client-server way is no longer possible (see my answers to the same question you asked before).
    D2kwutil does not exist for Forms9i because its client-server library. Get WebUtil from otn.oracle.com/products/forms instead
    Frank

  • How to set different icons for different windows which is seen in the top left corner?

    Hi
    How to set different icons for different windows which is seen in the top left corner? I know when building exe there is a option to edit icons or add icons and that icon is default for all the windows in the project. But i want different icons for different windows which is possible in VB.
    Is there any way to set icon by calling any dlls.
    Thanks & Regards
    Samuel J
    [email protected]

    Hi Sam,
    no problem. See the attachment.
    Mike
    Attachments:
    TestIcon_LV85.zip ‏44 KB

  • Can the "Finder" icon be set to always open a new window?

    Can the "Finder" icon (on the dock) be set to simply open a new window every time when clicked? Instead of always selecting the dialog "new finder window" under "File" ? Or having to right clicking on the FINDER dock icon, then selecting "new finder window".
    I'd like to simply click on the finder icon and have a new window just open every time.
    Same with Safair. Simply click on the "Safari" dock icon, and a new blank safari window would open, instead of selecting "new window" under safari "File" menu.
    I don't know if this can be set by setting a command via terminal, or ?
    There are no options under preferences to do this.
    Usually there is some "command line" done within the terminal app, to tweek most default settings, like what I want to do...?

    The easiest way to open new windows in Finder, Safari and just about any other program in Mac OS X is to use the keyboard shortcut, 'Command' + 'n'

  • How to Set Taskbar Icon in Windows 10?

    I have installed windows 10 preview version and try to develop apps on it.
    I use
    SendMessage(hwnd, WM_SETICON, ICON_SMALL, myicon); to change the application icon before win 8.1.
    But I found that the icon in taskbar is no longer the same as that of window icon in windows 10!
    It is the same as the tray icon (next to the clock) now.
    This is quite strange and the resolution is blurred since the tray icon image is too small.
    The problem occurs on the desktop notification icon, too.
    Dropbox windows app has the same problem (app icon in taskbar is the same as the tray icon, so as the notification icon)
    Is this a new design for taskbar icon for windows 10?
    If so, is there a API to change the icon to a customize image?
    Thank you very much!

    Hi,
    Thank you for your information!
    I still have some questions:
    1. What does "same functionality" mean? It seems that the notification is a new feature in win 10.
    2. I cannot find any update about the taskbar icon from win 8.1 to win 10. But the way to configure the icon is changed. This really bothers me because the blurred icon looks so ugly...
    Thank you very much!
    1. sorry typo, "some functionality"
    2. can't help you there, i'm not encountering blurred icon. might be because of graphics driver compatibility.
    try installing the latest graphics driver.

  • Can't set a icon for a shortcut of a visual studio installer project

    hi.
    I created a visual studio project (VS 2013, windows 8) from a exist project in the selution, but i can't set the icon on the desktop and program menu.
    i tried all the selution i found in the web:
    changed the extention to .exe
    the size of the icon is 13 k"b, but i still dont see the icon.
    i also tried making a shurtcut from Primary Output, with no change.
    It should be noted, that in the properties of the shortcot, it shows that there is a icon, and aslo the shortcut works, and ythe icon is showed in the install program, bot the icon is not showed on the desktop and the program menu.

    hi.
    I created a visual studio project (VS 2013, windows 8) from a exist project in the selution, but i can't set the icon on the desktop and program menu.
    i tried all the selution i found in the web:
    changed the extention to .exe
    the size of the icon is 13 k"b, but i still dont see the icon.
    i also tried making a shurtcut from Primary Output, with no change.
    It should be noted, that in the properties of the shortcot, it shows that there is a icon, and aslo the shortcut works, and ythe icon is showed in the install program, bot the icon is not showed on the desktop and the program menu.
    Hello,
    It seems that you want to add an icon for your application to be used as a shortcut or an icon located in quick start explorer.
    You could add that icon with the following way.
    How to: Specify an Application Icon (Visual Basic, C#)
    In addition, we should pay attention to the icon format for different systems and different DPI modes.
    You could refer to the following thread.
    Which icon sizes should my Windows application's icon include?
    The following format works for both windows 8 and windows 7.
    Windows 7:
    Explorer views:
    Details / List / Small symbols: 16
    All other options: 256 (resized, if necessary)
    Right-click->Properties / choosing a new icon: 32
    Pinned to taskbar: 32
    Right-click-menu: 16
    Desktop:
    Small symbols: 32
    Medium symbols: 48
    Large symbols: 256 (resized, if necessary)
    Zooming using Ctrl+Mouse wheel: 16, 32, 48, 256
    Regards,
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Icon size ('open file' window)

    As a newcomer to ML, I have found that the icon size in 'open file' windows is far to small to identify jpg image files
    I have increased the icon size that appears in finder windows when set to 'icon view', but this makes no difference

    I have found a workaround answer to this in the 'preview' function activated by the space bar, but when using the File>open panel to select files for upload to a website, it only works on 1 file at a time
    So I would still be grateful to anyone who knows how to increase the icon size

  • Setting Close icon (X) for a container

    Hi,
    I just want to know whether it is possible to set close icon (X) for a panel or any other component. Here close icon mean the one which we see on the top right cornet of a IE window.
    Thanks in advance.
    Sapna

    There is a tutorial for JScrollPane:
    http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html
    It came to my mind that JSplitPane is not using JScrollPane for the two components you add. So perhaps the solution would be to "wrap" both your components to their own JScrollPane before you add them to the split pane.
    Then for those scroll panes I would probably use:
    JScrollPane.setColumnHeaderView(myXCloseButtonInAPanel)
    or
    JScrollPane.setCorner(upperRightCorner, myXCloseButton)
    I don't know if that will work, or how it will look like now that you use the scroll pane's scrollbars instead of the split pane's scroll bar. You have to experiment with it. The scroll pane's should be able to resize themself to fit in the split panes areas when you move the divider, and maybe that's not so easy to do. Otherwise you will end up with both a scrollbar from the split pane and a scroll bar from the scroll pane.. yuck.
    Maybe someone else has a better solution?

  • Firefox icon changes to default Windows icon after a few days

    Downloaded Firefox browser on new HP Pavilion dv6. After a couple of days, Firefox icon changes to default Windows program icon. Uninstalled Firefox and re-installed. After a few days, the icon changed back to default Windows program icon. I cannot manually change icon back under Properties setting as default program icon is now associated with Firefox program. Laptop is 64-bit, and program is installed under Windows x86 folder.
    Is this a Microsoft setting issue? Or do I need a different download for 64-bit?

    You can change FN and CTRL key in the BIOS

  • Set vi icon invoke node

    The invoke node in LV7.0 (windows) has a Get vi icon and a Set vi icon property. The Get vi icon works just fine (can save bitmaps to files etc). But I can't get the Set vi icon to work. Even if i wire the output from one Get vi icon directly to the input of a Set vi icon, nothing happends. What am i doing wrong?
    Thanks

    Without an example it will be hard to say.
    Let me guess;
    Properies of that type (anything you would be temppted to save after setting it) can not be manipulated when the VI is running or reserved to run.
    I have posted a crude example of two VI's.
    Download both.
    Open both.
    Observe icons of both.
    Set the file path on the FP of the "Set Icon" to the path of your target.
    Run Set icon.
    Observe the icon of the target has now changed.
    I hope this helps,
    Ben
    Ben Rayner
    Certified LabVIEW Developer
    www.DSAut
    omation.com
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    set_icon.vi ‏23 KB
    icon_target.vi ‏5 KB

  • Icons in Mail inbox window disappear.

    Using 10.5.5 on a 2.8 8 core. Recently when I open the inbox in mail I see that I have lost the icons from the top of the window, the ones that would appear over Delete, junk, Reply, Reply all, Forward etc. They still function by clicking on the printed word and when the next screen appears icons are back.(in the new screen) It only occurs in the inbox window. What I have tried is to no avail. Rebooting, repairing permissions, running disk utility repair from another drive, disk warrior rebuild. Nothing seems to help. I even tossed Mail app and replaced with a working Mail app from another internal. No luck. Next step would be to reinstall 10.5 (original instal disk) but don't want to have to go through that hassle updating and loosing a couple of weeks of emails.. Is there aa way to just reinstall Mail? Any ideas appreciated.

    Hmmm… I went to school with somebody with a first name starting with D and last name of Balke; may I ask what city you're in?
    Next step would be to reinstall 10.5 (original instal disk) but don't want to have to go through that hassle updating and loosing a couple of weeks of emails.
    No, that's not the next step; way too drastic and huge time-waster. We need to find the problem and fix that instead, since the application is rarely the problem.
    Did you install anything just before you noticed this problem, and if so, what exactly was it? Have you tried choosing View > Customize Toolbar… and restoring the default set of icons to see if that will fix the problem? If not, do that, then quit Mail and restart it to see if your changes stick and it works reliably.
    Mulder

  • I'm trying to connect my MacBook Pro running on OS 10.8.2 to a Linksys EA3500 router and when I go to click on the set up icon I get an "unsupported operating system". Any suggestions on what to do? The Linksys site is useless.

    I'm trying to connect my MacBook Pro running on OS 10.8.2 to a Linksys EA3500 router and when I go to click on the set up icon I get an "unsupported operating system". Any suggestions on what to do? The Linksys site is useless. Do I need some kind of upgrade?

    Don't use the CD software its not necessary.
    Infact put it in the trash.
    Your router will have an IP address in the range 192.168.1.1
    Connect your router to your Mac via Ethernet cable (They usually supply one with the router and don't worry which end goes where the Mac LAN socket is bi-directional)
    Also connect your router to your telephone line.
    Now open your Web browser Safari . Type in the IP address above and a Javascript control panel will launch
    Enter the default password and username (They are on a label on the router )
    Your now have the ability to set up your router.
    Your will need the password and user name supplied to you by your ISP at a minimum.
    Enter these and most modern routers automatically configure the basic networking setting.
    You now need to go to the security setting and set this as WPA2 Personal (NOT Enterprise) or WPA2 with AES and TKIP which ever it refers to and create a pass-phase. WRITE it down
    You should be online.
    Now remove the cable and connect to the Wifi and enter that passphase.

  • How to set the icon for the entire application with JFrame.setIconImage

    I set the icon on the main frame using JFrame.setIconImage(). The icon is shown properly in the main frame.
    If more JFrames are opened from the main frame, the newly opened JFrames also show the icon.
    However if JDialogs are opended, in some cases the icon set on the main frame is shown and in other cases the coffee cup.
    What is JFrame.setIconImage() expected to do? Setting the icon for a single JFrame or the entire application?
    How can I set the icon for the entire application?
    How can I set the icon for JDialogs?
    Thank you

    In order for your dialogs to use the same icon as the frame, you must parent the dialogs to the frame which has the custom icon.
    See the following thread for more information: http://forum.java.sun.com/thread.jsp?forum=57&thread=362542
    cheers,
    Greg

  • Icon view in Finder windows do not autowrap

    I am using 10.5.1 on a 17" MBP 2.16 ghz.
    Since installing Leopard, Icon view in Finder windows do not autowrap and Finder windows do not always remember their display preferences.
    The Trash auto-wraps (the icons spread to take up the entire window if it is enlarged) But Opening a Folder in my default list view and switching to Icon view and then enarging the window only shows icons in the original window width. EG, If it were 3 colums of icons, it stays 3 columns of icons unless I use Clean Up TWICE and then I get 10 columns of icons which will wrap.
    Is this a Leopard BUG or a local problem. Any suggestions on fixing it?
    TIA,
    Bill

    Yeh - though I use cmd-J which I have used since it appeared, 10.1?
    But I just solved my problem. In my use as defaults selection, I had Snap to Grid selected in the arrange by pop-up rather than by Name.
    Selecting Name and clicking on Use as Defaults makes things work as expected.
    Thanks for making me look closely!
    Cheers,
    Bill

  • When I try to set up Icloud control panel in Windows Vista, I get "your setup couldn't be started because the Icloud server stopped responding. I've tried loads of fixes suggested on the net but none worked. Can anyone help me please?

    When I try to set up Icloud control panel in Windows Vista, I get "your setup couldn't be started because the Icloud server stopped responding. I've tried loads of fixes suggested on the net but none worked. Can anyone help me please?

    Hello, ksb2. 
    Thank you for visiting Apple Support Communities.
    We are investigating this issue. This article will be updated as more information becomes available.
    iCloud: iCloud Control Panel setup cannot be started
    http://support.apple.com/kb/TS5178
    Cheers,
    Jason H.

Maybe you are looking for

  • Two Thin Pink Vertical Lines accross my Screen

    Hello everyone, I purchased an HP ENVY dv6 Notebook PC early this July, 2014. By August, I realized a thin pink line was flashing accross my screen. I freaked out inmediately. Now, in September, two thing pink lines appeared. What can I do?  I need a

  • How to streaming data/image from labview to a third party software

    Hi, i am working on a research project and stuck on the following problem: I have two cameras and one IMU Sensor unit, all conected to my PC. I save the camera images as avi format and the IMU sensor as TDMS format. I have also another software runni

  • Disabling phone number for iMessage

    How do I disable the phone number from IMessage? I want to be able to use iMessage, but I need to be able to use SMS to some of the same recipients. SMS will arrive, iMessage not always.

  • SQL: Aggregating Problem

    Hello, i have following problem with aggregating values with one of our tables: For each day there is a row which contains the change to the previous day.We need now a view containing for each date of the year a subtotal from the beginning of the yea

  • Processing an XML "command file"

    Hi! I am planning to implement an application where the middle-tier (a DataWebBean relying on BC4J?) processes XML files. These XML files would be "command" files to insert/update/delete data in the database - actually they would be very similar to d