How to show popup message in jpanel when mouse is moved over some area

i have made a bar graph for my database in jpanel. now i want to show the proper data in popup when user moves mouse over apprpriate bar in jpanel. i would like to know is there is any way to do this. i need help as i m new in the field of java. i am making birthday remainder service for user. i am using j2se.

i want to show the proper data in popup when user moves mouse over apprpriate bar Sounds like you want to use a tooltip. Is your "bar"
a) a real component ?
If so, then just use setToolTipText(...) method
b) a graphical drawing?
Then you will need to convert the mouse coordinates and display a tool tip based on the coordinats. The SwingSet example that comes with the JDK has an example of this:
change to directory: j2sdk1.4.2\demo\jfc\SwingSet2
then execute >java -jar SwingSet2.jar

Similar Messages

  • Show popup message if data is modified while moving to other screen

    Hi,
    We are using Jdeveloper 11.1.1.4.0,
    If any data is modified in the current page and without clicking save button, we have to show a message like ‘Do you want to save the modified data’,
    while navigating to another page or closing the browser.
    How do we get to know whether the data is modified or not?
    Regards,
    Vijay
    Edited by: Vijayakumar Palanisamy on Dec 1, 2011 10:35 PM

    Hi,
    There is an out of the box behavior that understands the uncommitted data when leaving the page.
    It is the uncommitted data behavior
    http://www.oracle.com/technetwork/developer-tools/adf/unsaveddatawarning-100139.html
    However, this is a warning that will not commit any values.
    In order to do that, you have to do it manually, as far as I know ofcourse.
    One way is to get the Application Module, get the Transaction and check if it isDirty.
    If it is, show a custom popup with what ever you want.
    You can apply this in all the cases of navigation you want.
    Regards,
    Dimitris.

  • How to show warning message in am

    How to show warning message in am but not Stop , it still can go ahead.
    Thank you very much.

    jamras ,
    If i got you correct you wanna show user a list fo warnings after that have occured in some method in AM, and show them to user collectively, and the processing of the page should not stop in the above. What you need to do for it, is instead of throwing warning message in AM, collect all warnings in a arraylist or vector. when you navigate back to CO, iterate through this arraylist/vector and for each use pagecontext.putDialogmessage(oaexception).In this way you will be able to show all warning messages on page and your processing will not stop!
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • I have an ipod touch 4g. I did not have wifi for three days and when I came home my friends said they texted me when i didnt have signal. The messages i received when i did not have signal are not showing up. Can someone please help me?

    I have an ipod touch 4g. I did not have wifi for three days and when I came home my friends said they texted me when i didnt have signal. The messages i received when i did not have signal are not showing up. Can someone please help me?

    You said "The messages i received when i did not have signal are not showing up."
    How do you know received them?
    If the sender got a message that the Messagers were not delivered than they were never delivered and the only way for you to get them is for the sender to resent them

  • How to show Popup window in OAF on click of a button

    How to show Popup window in OAF on click of a button (Without using Javascript)
    1. I have one OAF page on which i should have button Called "Next"
    2. On clicking of this button a new window/page should be displayed with the image stored in database. on clicking on this "Next" button again next image from the database should be displayed on the newly opened window/page.
    3. Is it possible to configure OAF to render window_II in the opposite screen of window_I where the OAF client resides? (If the OAF-client resides in screen_I render window with image in screen_II). That is, at the first click on the Next-button, window_II appers on screen_II and not some random location. The user will have 2 screen/monitors on his work place.
    4. Given that the two windows reside on each screen, is it possible to make OAF remember the position of window_II ? The goal of this is to force the window to pop up on the same location on the same screen next time the Next-button is pressed.
    5. If window_II is closed (eg. by using X) and the Next-button in window_I is pressed again, will window_II pop up in the same location and screen as previously ?
    6. Is it possible to have a Print-button in window_I what prints the scanned picture in window_II ? Is it possible to have the click on this Print-button to open the standard print dialog on top of window_II ? Could the button be placed in window_II as well, having the same functionality ?

    I have tried to open home page window. You can change the URL according to your requirement.
    import oracle.apps.fnd.framework.webui.OAUrl;
    StringBuffer l_buffer = new StringBuffer();
    l_buffer.append("javascript:mywin = openWindow(top, '");
    String url = "/OA_HTML/OA.jsp?OAFunc=OAHOMEPAGE"; // Calling Oracle Home Page
    OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
    String strUrl = popupUrl.createURL(pageContext);
    l_buffer.append(strUrl.toString());
    l_buffer.append("', 'lovWindow', {width:750, height:550},false,'dialog',null);");
    pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
    Above code will open the new page in new window.
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to display popup messages in webdynpro

    Hi all,
                I have an application which has continue button.if the userclicks on this button a pop has to come with the msg as "Do u want to continue" ..followed by Yes and No....
    how to show popup msgs in my webdynpro application
    Regards
    Padma N

    Hi! padma,
      please go through the following tutorial, you will get a good idea..
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#23">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#23</a>
    you need to create an object of IWDConfirmationDialog and also the eventHandle.
    regards,
    Mithileshwar Sahu

  • How to show error message using java.awt?

    How to show error message using java.awt?
    Which is the class corresponding to the JOptionPane?
    Or I need to use Frame ?

    No, JOptionPane is swing!
    You would have to create your own frame, put your message in it, then show it.

  • HT1660 My itunes library has automatically started to list my songs alphabetically.  I do not want this.  How do I change it so that when albums come up, the songs are listed in the order of the imported album, NOT alphabetically.

    My itunes library has automatically started to list my songs alphabetically.  I do not want this.  How do I change it so that when albums come up, the songs are listed in the order of the imported album, NOT alphabetically.

    For the missing Artists on your iPod, make sure their tracks in iTunes are not marked as "Part of a compilation" in iTunes. You can do this by highlighting the track, right->clicking on them and choosing "Get Info" from the shortcut menu. When the window pops up, head over to the Info tab and make sure there is NO tick mark next to this option in the lower right hand corner. Lastly, sync the updated changes to your iPod.
    B-rock

  • It's been 4 days now my App Store show 2 message it means that I have to update some applications but every time I open my App Store and press update it only shows blank page but if I press genius, top charts, featured, search I can browse them

    It's been 4 days now my App Store show 2 message it means that I have to update some applications but every time I open my App Store and press update it only shows blank page but if I press genius, top charts, featured, search I can browse them

    It's been 4 days now my App Store show 2 message it means that I have to update some applications but every time I open my App Store and press update it only shows blank page but if I press genius, top charts, featured, search I can browse them

  • How do I delete old email addresses, when I try and play some of my songs I get a not authorized pop-up with an old email address?

    How do I delete old email addresses, when I try and play some of my songs I get a not authorized pop-up with an old email address?

    Edit the list the comes up when you go to the Window menu and select "Previous Recipients".
    charlie

  • How come my bluetooth isn't functioning when i wish to bluetooth some pictures from my handphone?

    How come my bluetooth isn't functioning when i wish to bluetooth some pictures from my handphone?

    Bluetooth on the iPad is aimed at devices such as headphones and keyboards - this article lists the bluetooth profiles that are possible on iOS devices http://support.apple.com/kb/HT3647

  • How to show a message when a workflow is finished

    hi i have a SharePoint list which has a list WorkFlow once an item is added to a list it copies the item to another list.
    now i need to show a message box when an item is added to the other list by the WorkFlow.
    Alen Austin

    This is not really what WF is about.
    You can send an email, or set a value in one of the list item fields. That's about it.
    w: http://www.the-north.com/sharepoint | t: @JMcAllisterCH | YouTube: http://www.youtube.com/user/JamieMcAllisterMVP

  • How to show a message in a form 'PL/SQL Button Event Handler'

    We need validate the sal of an employee, and if it is bigger the value musts
    not be inserted.
    We trying a code like the one shown in the note 134312.1 'HOW TO PASS A
    PARAMETER FROM A PORTAL FORM TO A STORED PROCEDURE' and it works in the insert event of the insert button (using 'PL/SQL Button Event Handler') and it works, but we need to show a message that says the data wasn't inserted. How can we do this?
    The code we used is:
    declare
    v_deptno scott.emp.deptno%type;
    v_empno scott.emp.empno%type;
    v_sal scott.emp.sal%type;
    mySal scott.emp.sal%type;
    v_string varchar2(256);
    blk varchar2(10):='DEFAULT';
    begin
    select sal into mySal from scott.emp where empno=7369;
    v_deptno:=p_session.get_value_as_number(p_block_name=>blk,
    p_attribute_name=>'A_DEPTNO');
    v_empno:=p_session.get_value_as_number(p_block_name=>blk,
    p_attribute_name=>'A_EMPNO');
    v_sal:=p_session.get_value_as_number(p_block_name=>blk,
    p_attribute_name=>'A_SAL');
    v_string:='You just inserted empno: '||to_char(v_empno) ||'to deptno ->
    '||to_char(v_deptno);
    if mySal < v_sal then
    doInsert;
    else
    -- We want to display a message here, when mySal > v_sal
    end if;
    end;
    ----------------------------------

    I did something similar but wasn't using a stored procedure. Couldn't you set a flag variable once you know you're not doing the insert and in the "before displaying the form" section put an IF to check if your flag was set, and if so do an HTP.Print('You are overpaid buddy!');
    Then just reset your flag.

  • How to show popup from backing bean code immediately?

    Hi,
    I'm using JDeveloper 11.1.2.1.0 and have problems with showing popups. I have a button with an action on my page and a method in backing bean.
    I want to rise up few popups from this method in backing bean (for example just an anouncement that something will happen) or a dialog
    (for example a question if you want to continue).
    I understand how to get a dialog response to deal with it in code, but the problem is that the popup doesn't show up immediately, but only when
    this method called on button finishes. I'd like to handle dialog responses in the middle of the action and then the code to continue with the execution.
    Here is my backing bean code:
    private RichPopup popup;
    public String test() {
    //Some code...
    RichPopup.PopupHints hints = new RichPopup.PopupHints();
    popup.show(hints);
    //Here is the place for code which I want to be executed after popup closes,
    //but is executed before the popup shows...
    return null;
    And here is part of my jssf:
    <af:commandButton text="Test" id="cb1"
    action="#{popupBean.test}"/>
    <af:popup id="popup" binding="#{popupBean.popup}">
    <af:dialog id="dialog" type="yesNo"
    title="Dialog"
    dialogListener="#{popupBean.onDialogAction}"
    binding="#{popupBean.dialog}" clientComponent="true">
    <af:outputText value="Do you want to continue?" id="ot1"/>
    <af:clientListener method="onDialogCancel" type="dialog"/>
    <af:serverListener type="DialogCancelHandlerEvent" method="#{popupBean.onDialogCancel}"/>
    </af:dialog>
    </af:popup>
    Can someone give me some answer how to show the popup from backing bean code immediately?
    Thanks in advance,
    Tina

    If you want to execute code after popup closes, then put this code in PopupCanceledListener or in DialogListener(you can't block method execution).
    Dario

  • How to show error page in browser when Column cant be null

    Hello everyone,
    I've got a Record Insertion Form, and some of the fields are
    set as "NOT NULL". When I miss out a few fields, the browser shows
    the text - Column 'propertytype' cannot be null, which is fine, as
    it cannot be null. But how do I redirect this to a user friendly
    page which basically says, "sorry you havent written in all the
    fields, please go back". How do I do this in dreamweaver?
    Thank You

    You need to validate all user input prior to executing any
    sql statement. That will do it. There are also techniques to trap
    error messages, which vary depending on the scripting language you
    are using.

Maybe you are looking for

  • Ran Out of Storage While Editing

    I am about 2/3 through editing a large file that is about an hour long in the timeline.  I know this is a large file, but so far, Final Cut Pro X has been able to handle it without acting too sluggish.  However, I'm about 2/3 through with the project

  • Can I cut/paste my backups to an external hdd and then back to my mac?

    Ok, here's my issue and I'm sure I'm not the only one. I have an iPhone6 and my wife has one as well, and we both have iPads. I have to backup all of these somewhere, and my current device is a Macbook Pro with 250gb SSD. As you understand, backing u

  • How to treat URL as a local file

    Hi, I am working on an existing piece of code. The whole code has been designed in such a way that all the methods take file as the argument. for example getMiMeType(File F) ........However, now my function is to add streaming capabilities so that le

  • Create multiple idocs at once

    Dear Experts, I need to create few Idocs - for MBGMCR -  in WE19. Can you please suggest is there any shortcut to to similate multiple idocs at a time. I saw the option of using file as a template in WE19. But donot know how to use it. Can some one p

  • Fixed order of photos for album w/o sorting

    When importing photos, PSE (by default) imports using a LIFO (Last In First Out) method - hence photos are in choronological order from last to first taken. If photos are from, say, a vacation, this is a problem since nobody wants to see their vacati