How to use Image

Hi there, I've tried to build splash screen to load the logo in .png format, but for some reason it doesn't work. here is the steps that I've done:
1> Conver the gif file to png
2> store the image file to the res/ folder
3> jar up the image with the jar files
Is there anything that I missed from that steps??
My code looks so simple just this:
Image logo = null;
try
logo = Image.createImage("image.png");
catch(IOException ioe)
Alert alert = new Alert("Splash screen", "test", logo, null);
display.getDisplay(this).setCurrent(alert);
Than;x for any help

1>
2> Image logo = null;
3>
4> try
5> {
6> logo = Image.createImage("image.png");
7> }
8> catch(IOException ioe)
9> {}
10> Alert alert = new Alert("Splash screen", "test", 11>logo,
12> null);
13>
14> display.getDisplay(this).setCurrent(alert);
In line 6 add a slash before the image name, like this:
logo = Image.createImage("/image.png");

Similar Messages

  • How to use images from ADFLib

    Hello OTN,
    My application is devided into several ADFLibs, one of them is CommonUI. It includes common skin and it is imported into every application part.
    There are some images which should be available in different parts, so I decided to put them in CommonUI.
    After deploying adflibCommonUI adn refreshing Resource Palette, somehow I expected to see this image there, but it isn't.
    Could someone, please, explain me, how to use images contained in imported ADFLib, for example, as imageLink icon?
    Thanks.
    ADF 11.1.2.1

    Hi,
    images need to be saved in a specific file structure in the JAR file to be accessible. See:
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/86-images-from-jar-427953.pdf
    Frank

  • How to use image maps in ADF 11g

    Can somebody point me to code snippet for using image maps in JSF Page.
    I just want to use image maps in my application..but i don't know how to use image maps in ADF.
    -Deepti

    Hi chris,
    My DataBase script is given in below
    CREATE TABLE XXSR.SR_HIERARCHY
    FORM_ID NUMBER,
    FORM_NAME VARCHAR2(30 BYTE),
    PARENT_FORM_ID NUMBER,
    FORM_LOCATION VARCHAR2(1000 BYTE),
    IMAGE_FILE ORDSYS.ORDIMAGE
    I want to store the image in database from front end using ADF 11g
    -Deepti
    Edited by: 913387 on Feb 24, 2012 5:36 AM

  • Can any one tell me how to use Image Prompt

    Hi
    Can any one tell me how to use Image Prompt in Answers?
    Thanks
    Rahman

    Had a look at this already?
    http://download.oracle.com/docs/cd/E12103_01/books/AnyUser/AboutPrompts.html
    Cheers,
    C.

  • How to use image and text in same component

    Hello
    Do you know how to use image and text in same component in java ?
    because i need this in my project ,which is chat application , to
    put the received text and any image if it is need within the text

    thanks levi_h
    JTextPane class extends JEditPane and allows you to embed
    images or other components within the text managed by the component

  • How to Use Image Processor for Multiple Sizes

    I'm trying to use Image Processor to work on a folder of images and to create several sizes of .jpg's . I find an option to Save as JPEG in one size only. Is there any way to set up Image Processor to save JPEG to multiple sizes?
    Thanks in advance for your help!!!

    Hi Mehtap,
    Using the script will give you multiple selections.
    This is how I did it and it works well. It just separated the values by semicolon ";" .
    TEXT_1.setText(DS_1.getFilterText("0CUSTOMER"));
    When selected only one value:
    When selected more than one value:

  • How to use image from a file in signature appearance.

    Hi,
    I am creating a Plugin for acrobat 9, using PubSec using DocSign sample as basis. I have created the appearance using text objects and the logos data that came with the DocSign sample. But I want to use image from a file (like, jpg) in the signature appearance creation. So far the documentation doesnt tell how to achieve this.
    Can you please tell me in a  "How-to" kinda way to achieve this?
    Thanks in advance.

    Thanks for ur prompt reply.
    There are so many samples in the sdk. which one is the "sample for adding images."?

  • How to use Image field in SQL-7 for curvs

    I sampling data from a NI-card. There will be a lot of data so I thought I should use Image-field in SQL-7 to save the hole curve. How do you do that?

    I would suggest looking into the Database Connectivity Toolset. It has complete SQL functionality and uses ADO to connect to many types of databases. I have it and it comes with example programs which demonstrate how to write to and read from databases using SQL.
    J.R. Allen

  • How to use image load gif of 「GIF87a」 by ByteArray ?

    Hi all:
    I want use image load gif file of 「GIF87a」 by ByteArray, but it not be displayed correctly on the screen, How can I do it , or How to conver 「GIF87a」 to 「GIF89a」 ?
    private function onButtonClick():void {
        fileRef.browse([new FileFilter("Images", "*.jpg;*.gif;*.png;*.swf")]);
        fileRef.addEventListener(Event.SELECT, onFileSelected);
    private function onFileSelected(e:Event):void {
        fileRef.addEventListener(Event.COMPLETE, onFileLoaded);
        fileRef.load();
    private function onFileLoaded(e:Event):void {
        var bytes:ByteArray = e.target.data;
        imageLoader.source = bytes;
    <mx:Image  id="imageLoader" onclick="onButtonClick()">

    Hi zhaojie198281,
    I've made a small modification on your code and it works fine. Try the following code,
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx"
            width="900" height="400">
    <fx:Script>
      <![CDATA[
       private var fileRef:FileReference = new FileReference();
       private function onButtonClick():void {
        fileRef.browse([new FileFilter("Images", "*.jpg;*.gif;*.png;*.swf")]);
        fileRef.addEventListener(Event.SELECT, onFileSelected);
       private function onFileSelected(e:Event):void {
        fileRef.addEventListener(Event.COMPLETE, onFileLoaded);
        fileRef.load();
       private function onFileLoaded(e:Event):void {
        var bytes:ByteArray = e.target.data;
        imageLoader.source = bytes;
      ]]>
    </fx:Script>
    <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <s:layout>
      <s:VerticalLayout paddingTop="10" paddingLeft="10"/>
    </s:layout>
    <s:Button label="Load!" click="onButtonClick()"/>
    <mx:Image id="imageLoader"/>
    </s:WindowedApplication>

  • Applet : How to use Images in Jar file

    I want to put all images into a jar file to improve speed of loading.
    But how to invoke images from Jar file?
    Thanks.

    @Op. It's very important for a developer to know how to find information, and that skill usually comes with experience. Google is one of the best ways to find information and solutions to the most common problems.
    Kaj

  • How to use image prompt?

    I want to use a map as image prompt. Are there some examples for that?

    Steps are :-
    1. Create new request in Answers.
    2. And click on Prompt tab.
    3. Click on create prompt , Click in Image prompt.
    4. Give Captions and image URL and other details.
    For more details use the link below.
    http://oraclebizint.wordpress.com/2007/11/02/oracle-bi-ee-101332-using-image-prompts/
    Regards,
    Som.

  • AIR Application Installer screen - name - How to use image??

    I want to use the image instead of the plain text for the name of the application. Is there any way to use image as an application name?
    PrincessWidget-app.xml
    <!-- Used as the filename for the application. Required. -->
    <filename>Princess Countdown Connection</filename>
    <!-- The name that is displayed in the AIR application installer.
    May have multiple values for each language. See samples or xsd schema file. Optional. -->
    <name>assets/Princess_logo.png</name>
    <!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
    <version>v1.0.1</version>

    thanks levi_h
    JTextPane class extends JEditPane and allows you to embed
    images or other components within the text managed by the component

  • How to use image as pannel header?

    hi all,
    we here here are building a flex application for Laingorourke
    UK's domestic housing solution, which will cater the dynamic needs
    of bussiness to collect user/customer's feedback and selection on
    various components which will be used/installed in his house.
    Now the challenge, we have to macth the flex application to the
    corporate branding ( www.exploreliving.co.uk/test ). as in flex
    style explorer there are header images used for pannels ( most
    probably ). We here also need the same. Can anbody guide me to the
    link/resource from where i can get an idea of doing the same.
    flex style explorer :
    http://www.adobe.com/devnet/flex/articles/style_explorer.html[b
    thx in advance.
    warm regards
    gaurav verma

    Gaurav,
    In Flex 2.0, you can do the following:
    <?xml version="1.0" encoding="iso-8859-1" ?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx
    anel width="400" height="300" title="My Title"
    titleBackgroundSkin="@Embed('header.gif')">
    <mx:Button/>
    <mx:TextInput/>
    </mx
    anel>
    </mx:Application>
    - Jason Szeto
    "gv79" <[email protected]> wrote in message
    news:e3mj9g$2v6$[email protected]..
    > hi all,
    >
    > we here here are building a flex application for
    Laingorourke UK's
    > domestic
    > housing solution, which will cater the dynamic needs of
    bussiness to
    > collect
    > user/customer's feedback and selection on various
    components which will be
    > used/installed in his house.
    >
    > Now the challenge, we have to macth the flex application
    to the corporate
    > branding ( www.exploreliving.co.uk/test ). as in flex
    style explorer there
    > are
    > header images used for pannels ( most probably ). We
    here also need the
    > same.
    > Can anbody guide me to the link/resource from where i
    can get an idea of
    > doing
    > the same.
    >
    > flex style explorer :
    >
    http://www.adobe.com/devnet/flex/articles/style_explorer.html
    >
    > thx in advance.
    >
    > warm regards
    > gaurav verma
    >

  • How to use image in forms

    i m create a form, drag & drop image item into form canvas.
    i want display image on image item, how to do.
    please tell me step by step with example.

    Hello
    here is a sample code example
    http://sheikyerbouti.developpez.com/tutoforms10g/tutoforms10g.htm
    Re: saving an image from form into database
    Hope it helps...
    Regards,
    Abdetu...
    Edited by: Abdetu on Feb 27, 2011 11:47 PM

  • How to use images as markers in LineChart dinamicaly

    Hello!
    I have some problem with charting. I have in my app a certain graph of  LineChart. Also there is a certain set of data. The challenge - to build a chart so that if i have a particular field in data item, i would be able to show the marker that is different. To do rhis i wrote a special class for ItemRenderer, look the code below. However, this class draws only geometric shapes, this is the way, but i would like to show some images, stored in the same directory as my application. I tried to do it by loading images as Bitmap object and using the Graphics object method beginBitmatFill but get nothing. What should i do?
    package classes.charts
              import flash.display.Graphics;
              import mx.charts.series.items.LineSeriesItem;
              import mx.core.IDataRenderer;
              import mx.skins.ProgrammaticSkin;
              import mx.controls.Alert;
         public class ExtendRenderer extends ProgrammaticSkin implements IDataRenderer
              private var images:Array = [0xff0000, 0x00ff00, 0x0000ff];
                private var _chartItem:LineSeriesItem;
              public function ExtendRenderer()
                   super();
              public function get data():Object
                   return _chartItem;
              public function set data(value:Object):void
                   _chartItem = value as LineSeriesItem;
                   invalidateDisplayList();
              override protected function
                   updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void {
                        super.updateDisplayList(unscaledWidth, unscaledHeight);
                        var g:Graphics = graphics;
                      g.clear();
                      var rad:Number = 5;
                      if (_chartItem.item.hasOwnProperty('enter'))
                           g.beginFill(0x00ff00);
                           rad = 10;
                      else if (_chartItem.item.hasOwnProperty('exit'))
                           g.beginFill(0xff0000);
                           rad = 10;
                      else if (_chartItem.item.hasOwnProperty('week'))
                           g.beginFill(0x0000ff);
                           rad = 10;
                      else
                           g.beginFill(0x0000ff);
                      g.drawCircle(unscaledWidth/2,unscaledHeight/2,rad);
                      g.endFill();
    P.S. Sorry for my english - its rather bad

    Thank you for answer, but i still have some questions...
    1) As i understand, we must add the private var as a variable to my class ExtendRenderer?
    2) Protected function of what class? Neither ProgrammaticSkin nor Image did not have this method...
    3) Why set data function and not updateDisplayList?
    Tried to add private var Image and  add it in set data method. Got nothing, even didn't got my chart, only the clean screen >.<

  • How to use images

    I need to use some pics in an application I'm developing, but I don't know how to.
    Can you name some libraries that I can use to display GIF files?

    Nice!
    it helps the first part...
    now i need to know how to display it and possibly move it...
    I'm developing a game, and I'm working on the numbers and the GDD so hard I can't really devote time to seeking the precise functions used for this... I know it's absolutely lame that I'm not devoting time to the graphics part, but I'm really pressured 'cause it's a school project for the end of the month... :S
    anyways, I only need the displaying and moving, or I'll have to work out some ASCII art and learn to move the text around the screen. : /
    Thanks!

Maybe you are looking for

  • Unknown error while signing in

    Firefox 3.6.13 + Sync 1.7 Entered username and password okay. Received the sync key. While trying to connect I get an "unknown error" displayed in red in the preference dialogue, or "Error While Signing In" when I hit the Connect button at lower righ

  • Error in simple struts application

    Hi friends, Happy to meet again. Please help me out from this situation which kills me for the past 1 week. While i try to deploy my first struts application through eclipse 3.2 with jdk1.5 and tomcat 5.5.25 and struts 2.0.9 i'm getting this error. w

  • ITunes high pitch noise when in full screen on 27" iMac11,1

    Hello, When running iTunes 10.5.1 in full screen mode on Lion 10.7.2, I get a faint, high pitch noise coming from my speakers.  If I run iTunes in a refular window, the noise does not manifest itself.  I can switch back and forth between one full scr

  • Call an ABAP program from BIW

    Hi experts, How do I include an abap program in R/3 sandbox in my process chain in BW. I know how to do it in BW but this program is in the ECC sandbox. what I did was to create a job in R3 through SM36,this job had two steps one to run my program an

  • New Mac Pro and Cores

    The way that I see the new Mac Pro being advertised is that it is one processor with 4,6,8,12 cores.  Is this saying that cores are as good as processors now.  For example, my current Mac Pro has 2 Xeon quad cores, with a total of 8.  It seems to me