How can I  add MouseListener to my Object(Image),help me again

May be I don't say it claritily. But I think the proplem is very challenging to me ,maybe also to you! I want to draw an image in JPanel,the user can move it(such as drag and drop),or the user can
click the image so that show a dialog which tells user the information about the image.even the user can put the mouse over the image and soon appears something like toolTop .

Add the Image to a JLabel.
You can then set the tooltip text for that JLabel using setToolTipText.
You can add a mouse listener to that JLabel that will respond to a mouse click and pop up a new JDialog.
As for the drag-drop, I would get the other two things working first and then we can look at adding this functionality to the mouse listener.
private JLabel label;
private void createComponents()
  label = new JLabel(new ImageIcon("my-image.gif"));
  label.setToolTipText("This is the tool tip");
  label.addMouseListener(new MouseAdapter()
    public void mouseClicked(MouseEvent e)
      // code to show the dialog here
  add(label);
}Hope this helps.

Similar Messages

  • How can I add hyperlink to the object in iCloud pages ?

    Hi, there
    I want to add hyperlink to the object(image) in icloud pages.
    But it looks no such function on  icloud(any "add link" botton)
    I know that how to add hyperlint to the object in pages v5.2.
    1. place object
    2. prepare text box and add hyperlink to the text(invisible color)
    3. overlay object and textbox
    But, in icloud pages, I coundln't do above method.
    Pls give me some advice.
    Thanks.

    The feature to add images in tables is gone, ike about another 90 features that exists in Pages 09.

  • Acrobat Pro Extended - how can I add links to 3D-objects?

    Hi there,
    I'm using Acrobat Pro Extended 9.0 and I would like to attach links to different filetypes to a 3D-object in a 3D-PDF. I tried to use the link-tool but it seems like that only works for 2D-PDF. Also in the 3D-Reviewer I haven't found a way yet to make it work.
    Thanks
    what eva

    It's possible, but not in the simple tools-based way.
    The "easiest" way is to add a Javascript to the 3D annotation which hooks the mouse event, scans the event.hits array and reacts based on the contents. If a mesh object is clicked the hits array will contain the mesh name in position 0 (then everything behind it in order). Your only issues arise when you want the "normal" clicking action to work as well (for selecting nodes, etc.), in which case you have to ensure your script passes the events about.
    Many of the example files on the acrobatusers.com 3D gallery use that principle, and there are also some in the adobe.com section on 3D Javascript. The idea of a '3D linking tool' is a loooong way off - the way 3D is handled by Acrobat isn't set up to understand things at that level - the UI sees the 3D model as nothing but a black box that can be shouted at.

  • How can I add Disk Templates to My Image Garden

    I hope I got the right forum.  I kinda lost and this is my first time here.
    Geee  I really hate "My Image Garden"  But I don't know it or how to do things. I scan something, then have to drag it to my desktop then re-name it and file it.  What a pain!
    Okay first off, I'm on a 2008 iMac and the printer is the MG6320 black, replacing an old Epson R280.  Loved that one cause I could print 3x5 cards, the Print CD program nad a ton of disk templates.  But Canon never could sell the disc print feature I understand due to some patent issues, but I understand it was sold in Europe with the function.
    Well now I got the Canon printer and it does quite nice.  It's wireless on a netwwork of 3 Macs and 1 PC, haha
    Anyway okay I found the disk templates.  Oh yea all 3 of them ha ha.  But I have a ton of generic templates on my computer.
    Question is can I and how would I be able to add some more disk templates.  Canon support says they don't offer any more templates.
    Thanks
    Allen

    Yes, this drove me nuts!!!!  I know how to do all these things and hate all the 'pre-cast' options in Image Garden.
    Not sure about templates but I can at last print my own custom-made labels. 
    I finally found out how to do this by doing a web search.  I found the answer on YouTube - not a Canon site!!!
    I prepare my label in Photoshop - sized 12cm x 12cm and save it as a jpeg file in a folder named 'Disc labels'.  This is because Image Garden only likes to look at photos!!!!!
    Then, I open the 'print disc' function in the Quick Menu.  I navigate through my folders of photos until I find the disc labels one.  
    Right click on the label you want and you are offered several options, one of which is 'print disc label'!!!!!!  And - off you go.
    You can customise your images, design and text as YOU want them - not as those dreadful templates dictate!
    But ..... the Quick Menu has just decided not to work so I am looking for answers in another forum now!!!!!

  • How can I add Rescue E-mail? Please Help

    Hi, I'm Having trouble solving security question. So, I contacted Apple Tech support and they gave me this link. http://support.apple.com/kb/ht5312?viewlocale=en_US
    I don't have Rescue E-mail option on my Password and security tab.  And I was wondering If i could add rescue E-mail to my Account. It's really frustrating because when ever I try to download something, Apple ask for security answers and I forgot Them. Please help .

    See Kappy's great User Tips.
    See my User Tip for some help: Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities https://discussions.apple.com/docs/DOC-4551
    Send Apple an email request for help at: Apple - Support - iTunes Store - Contact Us http://www.apple.com/emea/support/itunes/contact.html
    Call Apple Support in your country: Customer Service: Contacting Apple for support and service http://support.apple.com/kb/HE57
     Cheers, Tom

  • How can i add another mesh on top of the previous mesh

    Hi :
    I was trying to add multiple mesh on top of the previous mesh, not replacing the previous ones.
    Can any one help me please?
    Steve

    Steve,
    It seems that Mylenium is out.
    How can i add one more same object on top of the existing one to add mesh on top of the existing one ?
    You may Ctrl+C+F/Cmd+C+F and then set Fill and Stroke to None (at the bottom of the Toolbox).

  • How can I add a PSD logo watermark file to an image in CS4 or Lightroom3?

    Hi,
    I have a psd file with my company logo as a watermark. How can I add that file to an image in CS4 or Lightroom3. I am sure it is really simple and I am just a bit dopey but would appreciate the help.
    Thanks.
    Natalie

    This is fully explained in the help file. Hit F1 and go to using the watermark editor, you will see there is is also a video tutorial so I won't repeat the advice here.
    You will need to change the PSD to a PNG in order to use it and retain any transparency layers. Open the file in Photoshop and choose save for web, then select either the PNG 8 or PNG 24 preset and save a copy of the file.

  • How can i add custom attributes to a new Class Object using the API ?

    Hello everyone,
    Here is my problem. I just created a subclass of Document using the API (not XML), by creating a ClassObjectDefinition and a ClassObject. Here is the code :
    // doc is an instance of Document
    ClassObject co = doc.getClassObject();
    ClassObjectDefinition cod = new ClassObjectDefinition(ifsSession);
    cod.setSuperclass(co);
    cod.setSuperclassName(co.getName());
    cod.setName("MYDocument");
    ClassObject c = (ClassObject)ifsSession.createSchemaObject(cod);
    Everything seems to be OK since i can see the new class when i use ifsmgr. But my question is : how can i add custom attributes to this new class ? Here is what i tried :
    AttributeDefinition value = new AttributeDefinition(ifsSession);
    value.setAttribute("FOO", AttributeValue.newAttributeValue("bar"));
    c.addAttribute(value);
    But i got the following error message :
    oracle.ifs.common.IfsException: IFS-30002: Unable to create new LibraryObject
    java.sql.SQLException: ORA-01400: impossible d'insirer NULL dans ("IFSSYS"."ODM_ATTRIBUTE"."DATATYPE")
    oracle.ifs.server.S_LibraryObjectData oracle.ifs.beans.LibrarySession.DMNewSchemaObject(oracle.ifs.server.S_LibraryObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.NewSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.createSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    void fr.sword.ifs.GestionDocument.IFSDocument.createDocument(java.lang.String)
    void fr.sword.ifs.GestionDocument.IFSDocument.main(java.lang.String[])
    So, what am i doing wrong ?
    More generally, are we restricted in the types of the attributes ? (for example, would it be possible to add an attribute that would be an inputStream ? Or an object that i have already created ?).
    Any help would be appreciated. Thanks in advance.
    Guillaume
    PS : i'm using Oracle iFS 1.1.9 on NT4 SP6 and Oracle 8.1.7
    null

    Hi Guillaume,
    you're welcome. Don't know exactly, but assume that ATTRIBUTEDATATYPE_UNKNOWN
    is used to check for erronous cases only
    and it shouldn't be used otherwise.
    Creating your own objects could be simply done via
    ClassObject ifsClassObject;
    DocumentDefinition ifsDocDef = new DocumentDefinition(ifsSession);
    // get class object for my very own document
    ifsClassObject = ClassObject.getClassObjectFromLabel(ifsSession, "MYDOCUMENT");
    // set the class for the document i'd like to create
    ifsDocDef.setClassObject(ifsClassObject);
    // set attributes and content for the document...
    ifsDocDef.setAttribute("MYFOO_ATTRIBUTE",....);
    ifsDocDef.setContent("This is the content of my document");
    // create the document...
    PublicObject doc = ifsSession.createPublicObject(ifsDocDef);
    null

  • IF_IXML : How can i add encoding with value UTF-8 to the document object??

    Hi
    i want to create a xml file with the following content:
    <?xml version="1.0" encoding="UTF-8"?>
    <OpenSearchDescription xmlns="http://...."> 
    </OpenSearchDescription>
    i did this with the if_ixml interface and rendered the content in a file 'D:\usr\sap\IFD\DVEBMGS01\log\TEST_out.xml
    <?xml version="1.0"?>
    <OpenSearchDescription xmlns="http://...."> 
    </OpenSearchDescription>
    BUT the document attribut(?) encoding="UTF-8"?> is missing!
    How can i add encoding with value UTF-8 to the document object?? it should look like:
    <?xml version="1.0" encoding="UTF-8"?>
    *here is my coding.
    TYPE-POOLS: ixml.
    CLASS cl_ixml DEFINITION LOAD.
    DATA: lo_ixml           TYPE REF TO if_ixml,
          lo_streamfactory  TYPE REF TO if_ixml_stream_factory,
          lo_document       TYPE REF TO if_ixml_document,
          lo_parent         TYPE REF TO if_ixml_element,
          lo_ostream        TYPE REF TO if_ixml_ostream,
          lo_renderer       TYPE REF TO if_ixml_renderer,
         lv_rc           TYPE i.
    lo_ixml = cl_ixml=>create( ).
    lo_streamfactory = lo_ixml->create_stream_factory( ).
    lo_document = lo_ixml->create_document( ).
    lo_parent = lo_document->create_simple_element( name   = 'OpenSearchDescription'  "root node
                                                    parent = lo_document ).
    lo_parent->set_attribute_ns( name   =  'xmlns'
                                 value  = 'http://....' ).
    *rausrendern in file
    lo_ostream = lo_streamfactory->create_ostream_uri( system_id = 'D:\usr\sap\IFD\DVEBMGS01\log\TEST_out.xml' ).
    lo_renderer = lo_ixml->create_renderer( ostream  = lo_ostream
                                            document = lo_document ).
    lv_rc = lo_renderer->render( ).
    Thanks for help
    Britta

    Use the following code:
    set an document encoding
      l_encoding = l_ixml->create_encoding( character_set = 'UTF-8'
                                            byte_order = if_ixml_encoding=>co_none ).
      l_success  = l_ostream->set_encoding( encoding = l_encoding ).
    create a xml renderer
      l_renderer = l_ixml->create_renderer( document = l_doc ostream  = l_ostream ).

  • How can i add an custom attribute and assign it to an existing custom object class in sun ds

    I need to add an attribute to sun ds schema and assign it to an existing custom object class.
    I know how to add an attribute but how can i add the attribute to an existing custom object class.
    Please help.
    Thanks

    The objectclasses attribute is multi-valued, so you can add several values to it as long as they are unique.
    For instance, I think you can add several declaration of the same objectclass as below (note the difference is the number of spaces in the value) howewer, from a schema perspective, only 1 will be taken into account:
    objectclasses: ( 2.5.6.6 NAME 'person' DESC 'Standard LDAP objectclass' SUP top MUST ( sn $ cn ) MAY ( description $ seeAlso $ telephoneNumber $ userPassword $ CustomAttr) X-ORIGIN 'RFC 2256' )
    objectclasses: ( 2.5.6.6 NAME   'person' DESC 'Standard LDAP objectclass' SUP top MUST ( sn $ cn ) MAY ( description $ seeAlso $ telephoneNumber $ userPassword $ CustomAttr) X-ORIGIN 'RFC 2256    ' )
    That's the reason why it is safe to delete previous value if you want to update an existing objectclass. No problem to add a new objectclass (new oid and new name) to the schema.
    -Sylvain

  • How can i add  fields to a cube which is in production support

    hi,
       how can i add fiels to a cube which is in production support.

    Hi Maruthi
    You need to add new fields to cube in Development system and then transport it to production after testing.
    Edit cube in RSA1. Add the new infoobjects from right hand directory to left hand pane and assign these new infoobjects to suitable dimensions. Save and activate the infocube. Now go to change update rules for this infocube and do proper mapping of these infoobjects.
    Save & activate the update rules.
    RSA1-> Transport connection-> select cube, update rules and related objects and create transport request.
    After testing is done, give the transport request number to your Basis person and he will do the transports for you.
    Regards
    Pradip

  • How can i add a new characteristic to Sap standard InfoObject?

    Hi Experts,
    Please anyone let me know how can I add a new characteristic or a key figure into an SAP standard InfoObject in order to add it to the standard InfoCube? The situation is I would like to add region and business unit to the characteristics of the Industrial Hygiene and Safety. After that, I would like to add them to the InfoCube called Accidents: Person Involved [0EIH_C02] that is located in the MultiProvider called Accidents: Complete View [0EIH_MC01]. Is it feasible to do this way?
    I just learned the BW/BI, so please help me with this. I would really appreciate your responses.
    Thanks,
    -Napadol

    Hi Napadol,
    To add a attribute in a char:
    1) Go to info object/char in change mode and add the additional attribute you want and select navigational attribute in attribute tab if you want. (Create these additional attribute first in info object catalouge)
    2) Activate the Object/Char
    3) open info cube in change mode and pick the characteristic from left panel to info cube dimension.
    4) Activate infocube.
    5) Go to multi provider add the char in one of the dimension and do identification for this char and activate.
    Regards,
    Kams

  • How can I add a new column in compress partition table.

    I have a compress partition table when I add a new column in that table it give me an error "ORA-22856: CANNOT ADD COLUMNS TO OBJECT TABLES". I had cretaed a table in this clause. How can I add a new column in compress partition table.
    CREATE TABLE Employee
    Empno Number,
    Tr_Date Date
    COMPRESS PARTITION BY RANGE (Tr_Date)
    PARTITION FIRST Values LESS THAN (To_Date('01-JUL-2006','DD-MON-YYYY')),
    PARTITION JUNK Values LESS THAN (MAXVALUE));
    Note :
    When I create table with this clause it will allow me to add a column.
    CREATE TABLE Employee
    Empno Number,
    Tr_Date Date
    PARTITION BY RANGE (Tr_Date)
    PARTITION FIRST Values LESS THAN (To_Date('01-JUL-2006','DD-MON-YYYY')),
    PARTITION JUNK Values LESS THAN (MAXVALUE));
    But for this I have to drop and recreate the table and I dont want this becaue my table is in online state i cannot take a risk. Please give me best solution.

    Hi Fahed,
    I guess, you are using Oracle 9i Database Release 9.2.0.2 and the Table which you need to alter is in OLTP environment where data is usually inserted using regular inserts. As a result, these tables generally do not get much benefit from using table compression. Table compression works best on read-only tables that are loaded once but read many times. Tables used in data warehousing applications, for example, are great candidates for table compression.
    Reference : http://www.oracle.com/technology/oramag/oracle/04-mar/o24tech_data.html
    Topic : When to Use Table Compression
    Bug
    Reference : http://dba.ipbhost.com/lofiversion/index.php/t147.html
    BUG:<2421054>
    Affects: RDBMS (9-A0)
    NB: FIXED
    Abstract: ENH: Allow ALTER TABLE to ADD/DROP columns for tables using COMPRESS feature
    Details:
    This is an enhancement to allow "ALTER TABLE" to ADD/DROP
    columns for tables using the COMPRESS feature.
    In 9i errors are reported for ADD/DROP but the text may
    be misleading:
    eg:
    ADD column fails with "ORA-22856: cannot add columns to object tables"
    DROP column fails with "ORA-12996: cannot drop system-generated virtual column"
    Note that a table which was previously marked as compress which has
    now been altered to NOCOMPRESS also signals such errors as the
    underlying table could still contain COMPRESS format datablocks.
    As of 10i ADD/SET UNUSED is allowed provided the ADD has no default value.
    Best Regards,
    Muhammad Waseem Haroon
    [email protected]

  • How can I add a new record in an Access table.

    How can I add a new record in access with LabView, using activex, without using the database connectivity tools.
    Message Edited by Noawena on 05-16-2008 09:25 AM

    Much easier with a toolkit but you could use ADO objects,
    get connection, make a SQL object "INSERT record INTO table where  ...." 
    Execute the parameterized query
    Free up record sets data
    close connection when done.
    This is a very simplified version
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • How can you add a where clause using "OR" with applied ViewCriteria?

    [JDeveloper 10.1.3 SU4]
    [JHeadstart 10.1.3 build 78]
    I am using JHeadstart, but have a question probably more in the ADF area. On the JHeadstart forum I asked:
    "I am overriding JhsApplicationModule's advancedSearch in order to be able to search in childtables. I created transient attributes, display those in advanced search and in the overridden method I check if any of these are filled by the user and create a where clause like 'EXISTS (SELECT 1 FROM <childtable> WHERE <column in childtable> = <column in EO's table> AND <another column in childtable> LIKE '<value supplied by user>)'. I add this whereclause using ViewObject.setWhereClause.
    So far so good and it works. However, if the user selects 'Result matches any criteria', combining setWhereClause and the normal advancedSearch QueryByExample implementation using ViewCriteriaRow do not provide the desired result, since the ViewCriteria and the setWhereClause are AND-ed together, which is fine if the user selects the (default) "Results match all criteria" (everything is AND-ed) but not the "Result matches any criteria", since then every criterium is OR-ed together, except for the setwhereclause criteria and the set of ViewCriteriaRows, they are AND-ed.
    I looked if I could specify that a WhereClause will be OR-ed to existing applied ViewCriteria, but no luck. Do I have to rewrite also advancedSearch's ViewCriteria implementation and write an entire setWhereClause implementation to be able to "OR" every criterium? Or any other suggestions? Can I look at the entire Where clause and rewrite it (after applyCriteria and setWhereClause are called on the VO)?
    Toine"
    Sandra Muller (JHeadstart Team) told me today: "This sounds like a JDeveloper/ADF issue that is not related to JHeadstart. The question is: how can you add a where clause using "OR" if there are already one or more ViewCriteria applied?
    To simplify the test case, you could create a simple ADF BC test client class in a test Model project without JHeadstart (in the test class, use bc4jclient + Ctrl-Enter), in which you first apply a few ViewCriteriaRows to a View Object and also add a where clause.
    Can you please log a TAR at MetaLink ( http://metalink.oracle.com/ ), or ask this question at the JDeveloper forum at http://otn.oracle.com/discussionforums/jdev.html ? (This what I am doing now ;-))
    Thanks,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting"
    Anyone knowing the answer or am I asking for an enhancement?
    Toine

    Hi,
    Can you SET your whereclause as follows ?
    ('Y' = <isAnd>
    and EXISTS (SELECT 1 FROM <childtable> WHERE <column in childtable> = <column in EO's table> AND <another column in childtable> LIKE '<value supplied by user>))
    OR ('N' = <isAnd>
    AND EXISTS (SELECT 1 FROM <childtable> WHERE <column in childtable> = <column in EO's table> OR <another column in childtable> LIKE '<value supplied by user>))
    )

Maybe you are looking for

  • Can i connect my ipod touch to internet, via a laptop that is connected to the net by a USB modem/dongle

    I have an i pod touch, which i use to facetime friends abroad when i am at home in the uk. I work on a ship and we have very limited broadband and we are not permitted to stream through company PC's. When we are in port what i would like to do is buy

  • Why is the JPG missing its clipping path when opening in Illustrator?

    I need to be able to create jpg images images in photoshop with a clipping mask so that my clients can open the files in their own programs with a transparent (not solid white) background.   I thought I used to be able to do this.   But now when I op

  • Problem when uploading a large file in PI - weird SQL I/O errors

    Hi guys, I'm facing a very difficult problem when uploading a 35 MB with an FTPs adapter. I see in the logs that, after the translation to XML, it's going to 170 MB. I receive the following error in the CC Monitoring: Error: com.sap.aii.af.ra.ms.api.

  • What app do I need to replace adobe

    When I go to watch a video or tv program it tells me I need adobe, but I know u can't down load it on iPads so what other program/app do I use? I did buy photon app but that doesn't seem to be working!

  • Question from student

    So I just started learning Oracle and immedeatly ran into some wird stuff. I've created some tables as per textbook, but when I use the describe command I get a strange result: SQL> SELECT table_name 2 FROM user_tables 3 ; TABLE_NAME ORDER_LINE INVEN