Tooltip for mousedragged

I did a program in applet..I want to set tooltip for the drawing..i.e.,when the oval is dragged its new co-ordinates should be displayed by using the tooltip..How can i do this..
.import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
import java.text.DateFormat;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import javax.swing.*;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.BorderFactory;
import javax.swing.border.Border;
public class mouseevent extends JApplet
      private static final int BALL_DIAMETER = 40; // Diameter of ball
    //--- instance variables
    /** Ball coords.  Changed by mouse listeners.  Used by paintComponent. */
    private int _ballX     = 450;   // x coord - set from drag
    private int _ballY     = 50;   // y coord - set from drag
    /** Position in ball of mouse press to make dragging look better. */
    private int _dragFromX = 0;    // pressed this far inside ball's
    private int _dragFromY = 0;    // bounding box.
    /** true means mouse was pressed in ball and still in panel.*/
    private boolean _canDrag  = false;
    JLabel label;
    String s= "aswedfrtyhgqwsadrftlopqasnhfgrchildnode1";   
    int width = s.length();   
    int border = 2;    int margin = 10;   
    int rectx = margin+border,recty =margin+border+63;   
    int rectwidth = 8, rectheight = 6;   
    int imgborder = 10;   
    int imgline1 = 300;  
    int labellocx = rectx+imgborder+13;  
    int labellocy = recty+imgborder-1;   
    int circlex = rectx+rectwidth;
    int circley = recty+rectheight;  
    int x =rectx+rectwidth+10;  
    int y = recty+rectheight+10;
    int x1 = x+17; 
    int y1 = y+20;  
    int titlebarx= 300;
    int titlebary = 40;  
    boolean title = true;
    String date[] = {"0","4","8","12","16","20","24"}; 
    String day[] = {"Mon","Tue","Wed","Thu","Fri","Sat"};
    int width1 = 180;
//    int f2= x+168;
    int n =180;
//    int dayx = 385;
    long From ;
    long To ;
    ArrayList dateList;
     int rect1x= 300;
    int rect1y = 100;
    int rect1width= 50;
    int rect1heigth = 50;
    boolean candrag = false;
    public void init()     
        Container cont = getContentPane();   
        cont.setLayout(new BorderLayout());
        // to see the scrollpane, the scrollpane has to be smaller        
        // then the component held within its viewport             
        setPreferredSize(new Dimension(300, 300));             
        JScrollPane scroll = new JScrollPane();              
        getContentPane().add(scroll, BorderLayout.CENTER);        
        scroll.getViewport().add(new Imagepanel());       
private class Imagepanel extends JPanel implements MouseListener,MouseMotionListener
        JScrollPane scroll = new JScrollPane();      
        Rectangle rect = new Rectangle(rectx,recty,rectwidth,rectheight);
        Rectangle rect1  = new Rectangle(rect1x,rect1y,rect1width,rect1heigth);
        Ellipse2D.Double circle = new Ellipse2D.Double(_ballX,_ballY,BALL_DIAMETER,BALL_DIAMETER);   
        Ellipse2D.Double circle1 = new Ellipse2D.Double(x+10,y+10,4,4);    
        boolean selected = false;  
        boolean selected1 = false;     
        int w ;     
    Imagepanel()       
        // setting the component to be largenr than the scrollpane           
        // just so we'll see scrollbars.
        setPreferredSize(new Dimension(32710,32710));      
        scroll = new JScrollPane();     
        add(scroll);                 
        addMouseListener(this);       
        addMouseMotionListener(this);
        setBorder(BorderFactory.createLineBorder(Color.BLACK, border));          
    protected void paintComponent(Graphics g)         
        int n = 168;
        int x = 300;
        int x1=300;
        int x2=x;
        int daydx=(width1/2);
        int dayx =(daydx+x);
        int f2= x+n;
        From = new java.util.GregorianCalendar(2007,01,01).getTime().getTime();
        To = new java.util.GregorianCalendar(2007,06,30).getTime().getTime();
        double Difference = To-From;
        long days = Math.round((Difference/(1000*60*60*24)));
        int noday = (int)days;
        Date fromDate = new java.util.GregorianCalendar(2007,01,01).getTime();
        Date toDate = new java.util.GregorianCalendar(2007,06,30).getTime();
        super.paintComponent(g);            
        Graphics2D g2 = (Graphics2D) g;             
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);       
        Font font = new Font("Ariel",Font.PLAIN,11); 
        Font font1 = new Font("Ariel",Font.PLAIN,9);
        g2.fillOval(_ballX, _ballY, BALL_DIAMETER-20, BALL_DIAMETER-20);
        g2.setBackground(Color.GRAY);
        //drawing the tilte bar     
        g2.setBackground(Color.WHITE);  
        g2.drawLine(imgline1,0,imgline1,getHeight()); 
        g2.setPaint(new Color(0,128,192));
        g2.fillRect(imgborder,imgborder,290,45);
        //g2.drawLine(margin,margin,titlebarx,titlebary);              
        //drawing the root node and labeling      
        g2.draw(rect);
        g2.setPaint(Color.WHITE);
        g2.drawLine(margin,margin,titlebarx,titlebary); 
        g2.drawString("RESOURCE",40,40);       
        g2.drawString("TIME",200,25);
        g2.setPaint(Color.green);
        g2.drawString("sadasd",344,22);
        g2.draw(circle);
        rect.setLocation(rectx,recty);      
        rect.setSize(rectwidth,rectheight);
        g2.setPaint(Color.BLACK);
        g2.drawString(" aswedfrtyhgqwsadrftlopqasnhfgrchildnode1",rectx+rectwidth+05,recty+rectheight);               
        for (int i = 0;i<noday;i++)
        Calendar  c = Calendar.getInstance(); // current date
            c.add(Calendar.DATE, i); // add one day
            SimpleDateFormat sdf = new  SimpleDateFormat("MM/dd/yy"); // use the pattern: day_of_month
            String str = sdf.format(c.getTime()); // fromat the date to string
            System.out.println(str); // print it at the console
            for (int j=0;j<6;j++)
                g2.setFont(font1);
                g2.drawLine(x1,40,x1,35);
                g2.drawString(date[j],x1,35);
//              g2.drawString(day[j],dayx,20);
                g2.drawString("24",f2,35);
                f2+=width1;
                x1+=30;
//              dayx=+170;
            g2.drawRect(x,10,width1,30);
            x+=width1;
            g2.drawString(str,dayx,20);
            dayx+=180;
        for(int k=0;k<n;k++)
            for(int l=0;l<6;l++)
            Calendar c = Calendar.getInstance(); // current datem
            c.add(Calendar.DAY_OF_WEEK, k); // add one day
            SimpleDateFormat sdf = new SimpleDateFormat("EEE"); // use the pattern: day_of_month
            String str = sdf.format(c.getTime()); // fromat the date to string
            System.out.println(str); // print it at the console
            g2.drawString(str,dayx,5);
//          g2.drawString(day[l],dayx,20);
            dayx+=180;
        //dividing the drawing panel      
        //drawing for the click event       
        if(selected)       
            Color color = Color.orange; 
            g2.fill(circle);
            g2.draw(circle);          
            //              g2.drawRoundRect(x+30,y+15,200,12,5,5);        
            g2.drawString("aswedfrtyhgqwsadrftlopqasnhfgrchildnode1",x+15,y+5);     
            g2.drawRect(300,y,100,15);      
        if(selected1)      
            g2.setFont(new Font("Arial",Font.PLAIN,12)); 
            g2.fill(circle1);
            g2.draw(circle1);           
            g2.drawString(" aswedfrtyhgqwsadrftlopqmasnhfgrchildnode1",x1+15,y1+5);  
    public void update(Graphics g)    
        paint(g);   
    public void mouseClicked(MouseEvent e)          
        //imagePaneMouseClicked(e);              
    private void imagePaneMouseClicked(MouseEvent e)        
        Point p = e.getPoint();         
        if (rect.contains(p))                  
            if (!selected)              
                selected = true;        
                repaint();               
        if(circle.contains(p))     
            if(!selected1)           
                selected1 = true;    
                repaint();           
        if(rect.contains(p)) 
            if(e.getClickCount() == 2)    
                selected = false;  
                repaint();      
    public void mousePressed(MouseEvent e)        
         int x = e.getX();   // Save the x coord of the click
        int y = e.getY();   // Save the y coord of the click
        if (x >= _ballX && x <= (_ballX + BALL_DIAMETER)
                && y >= _ballY && y <= (_ballY + BALL_DIAMETER)) {
            _canDrag = true;
            _dragFromX = x - _ballX;  // how far from left
            _dragFromY = y - _ballY;  // how far from top
        } else {
            _canDrag = false;
    public void mouseReleased(MouseEvent e) {        }               
    public void mouseEntered(MouseEvent e) {        }          
    public void mouseExited(MouseEvent e) { 
        candrag = false;
        public void mouseDragged(MouseEvent e) {
          if (_canDrag)
          {   // True only if button was pressed inside ball.
            //--- Ball pos from mouse and original click displacement
            _ballX = e.getX() - _dragFromX;
            _ballY = e.getY() - _dragFromY;
            //--- Don't move the ball off the screen sides
            _ballX = Math.max(_ballX, 0);
            _ballX = Math.min(_ballX, getWidth() - BALL_DIAMETER);
            //--- Don't move the ball off top or bottom
            _ballY = Math.max(_ballY, 0);
            _ballY = Math.min(_ballY, getHeight() - BALL_DIAMETER);
            this.repaint(); // Repaint because position changed.
            this.add(label);
            label.setText(""+_ballX+_ballY);
            label.setLocation(_ballX,_ballY);
        public void mouseMoved(MouseEvent e) {
}

The label is not getting displayed...the program throws some exception...
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at java.awt.Container.addImpl(Container.java:1015)
at java.awt.Container.add(Container.java:351)
at javaapplication5.mouseevent$Imagepanel.mouseDragged(mouseevent.java:346)
at java.awt.Component.processMouseMotionEvent(Component.java:5536)
at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3144)
at java.awt.Component.processEvent(Component.java:5257)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3909)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Similar Messages

  • How to assign a tooltip for a field in ALV editable grid?

    I have to display some instructions ( 50 chars long) for an editable field in alv.
    How to do this?
    BCALV_DEMO_TOOLTIP tells about assiging tooltip to an icon or symbol.
    Thanks,
    Ven..

    Neither of these two example programs help much in regards to tooltips against any field of any row. Both of these examples use tooltips for Icons. I have also been looking for a single example of tooltips usage outside of these two programs, and have found nothing in SAP, or on the internet, so far.
    Having said that, I have tried to implement the same method used by the later example, but have not got this to work. What I think we need is an example of this functionality where these Icons are not used!. I believe.
    Gary King

  • Jquery tooltip for sharepoint 2013 list (newform.aspx)

    I am looking for a simple solution/jquery tooltip for SharePoint list form fields.
    Something like below , but this one displays static text for each column and want tooltip text for each of my list column
    <script type="text/javascript" language="javascript" src="/wz_tooltip.js"></script><o:p></o:p>
    <a href="#" onmouseover="Tip('(This is test tooltip )');" onmouseout="UnTip();">
    Thanks in advance!
    <o:p></o:p>
    Amrita Talreja

    When you assign "Description" for every field in sharepoint list.SharePoint by default show this desc in a span just below the field control , like this.
    <span class="ms-metadata">This is simple desc</span>
    What you can try in jquery/javascript is to -
    - Search for this span [class="ms-metadata"] in your form table (table[class="ms-formtable"])
    - save its text() in a variable - var txtDesc = $("span selector").text();
    - Hide this span -$("span selector").hide()
    - Now you have dynamic desc message , you can add this as an "Title" attribute to your field control (textbox and other control)
    - $("your field control selector").attr("Title", txtDesc );
    Or can add a hyperlink for this -
    <a href="#" onmouseover="Tip('"+ txtDesc +"');" onmouseout="UnTip();">
    Thanks
    Ganesh Jat [My Blog |
    LinkedIn | Twitter ]
    Please click 'Mark As Answer' if a post solves your problem or 'Vote As Helpful' if it was useful.

  • Is there a way to have tooltips for every column in a TableView?

    Hi there!
    I found in documentation that any node and control can show a tooltip ( http://docs.oracle.com/javafx/2/api/javafx/scene/control/Tooltip.html ) but I can't get tooltips to work for TableColumn (a column from TableView).
    Do you have any idea how could I have tooltips for each column of the table view?

    TableColumn's are neither controls nor nodes, so you can neither set nor install tooltips on them.
    You can use cellfactories to set tooltips on cells generated from the factories.
    You can use css style lookups (node.lookup function) to get access to table nodes (such as the headers) after the tableview has been displayed on a stage and then manipulate the displayed nodes to add tooltips. It's not a great approach, but it is the only approach I know at the moment that would work.

  • How to implement tooltip for the list items for the particular column in sharepoint 2013

    Hi,
    I had created a list, How to implement tooltip for the list items for the particular column in SharePoint 2013.
    Any help will be appreciated

    We can use JavaScript or JQuery to show the tooltips. Refer to the following similar thread.
    http://social.technet.microsoft.com/forums/en/sharepointdevelopmentprevious/thread/1dac3ae0-c9ce-419d-b6dd-08dd48284324
    http://stackoverflow.com/questions/3366515/small-description-window-on-mouse-hover-on-hyperlink
    http://spjsblog.com/2012/02/12/list-view-preview-item-on-hover-sharepoint-2010/

  • Problem with setting tooltips for items of a JCombobox

    hi guys,
    I want to set tooltips for items of JComboBox & the code that i have written is given below , but the tooltip text is set for all the items of Nonitindustrycombo but the tooltips remain the same even for Nonitdesgcombo's items.
    Is that we need to refresh the ComboboxRenderer every time ?
    I am not able to trace out the exact reason for this,please if anyone can suggest me something regarding this would be of great use to me.
    class Searchpanel extends JPanel {
    String[] str = null;
    public SearchPanel(){
    Nonitindustrycombo.addItem("--Select--");
    ArrayList NonITindus = ERPModel.getAllNonitIndustry(); //gets all the items(strings) for Nonitindustrycombo
    for (Iterator iter = NonITindus.iterator(); iter.hasNext();) {
    String str = iter.next().toString();
    Nonitindustrycombo.addItem(str);
    SetTooltip(Nonitindustrycombo,NonITindus);
    Nonitdesgcombo.addItem("--Select---");
    ArrayList desg = ERPModel.getAllNonitDesg(); //gets all the items(strings) for Nonitdesgcombo
    for (Iterator iter = desg.iterator(); iter.hasNext();) {
    Nonitdesgcombo.addItem(iter.next());
    SetTooltip(Nonitdesgcombo,desg);
    class MyComboBoxRenderer extends BasicComboBoxRenderer
    public Component getListCellRendererComponent(JList list, Object value,
    int index, boolean isSelected,
    boolean cellHasFocus)
    if (isSelected)
    setBackground(list.getSelectionBackground());
    setForeground(list.getSelectionForeground());
    if (0 < (index))
    list.setToolTipText(str[index - 1]);
    else
    setBackground(list.getBackground());
    setForeground(list.getForeground());
    setFont(list.getFont());
    setText((value == null) ? "" : value.toString());
    return this;
    private void SetTooltip(JComboBox combo,ArrayList arr){
    str = (String []) arr.toArray (new String [arr.size ()]);
    combo.setRenderer(new MyComboBoxRenderer());
    public static void main(String[] args){
    new SearchPanel();
    Thanks ,
    vishal

    1) You where given a working example in your last posting on this topic. Compare your code with the working code to see whats different and fix it.
    2) The code you posted doesn't compile.
    3) You didn't use the "Code Formatting Tags" when you posted your code so it not readable.

  • Multiline tooltip for JComboBox items.

    Hi, As the title suggests I'd like to create a multiline tooltip for items in a combobox list.
    I have implemented a multiline tooltip renderer which works perfectly on any component except JComboBox items.
    I have also implemented a ListCellRenderer for a combobox that enables tooltips for the combobox items. Also works perfectly, except that they are single line tooltips.
    The tooltip text is read from an xml file, therefore I have no control on how long the line of text is. Most of the time the text also contains newlines.
    This is the method (overridden from JComponent) added to a subclass of a component so that that component uses the MultiLineToolTip:
        public JToolTip createToolTip() {
            MultiLineToolTip tip = new MultiLineToolTip(this);
            tip.setComponent(this);
            return tip;
        }And this is the ListCellRenderer used on the combobox, so that items have (single-line) tooltips enabled:
        private class ToolTipEnabledComboBoxRenderer extends JLabel implements ListCellRenderer{
             public ToolTipEnabledComboBoxRenderer(){
                  setOpaque(true);
             public Component getListCellRendererComponent(JList list,Object value,
                                                              int index,boolean isSelected,
                                                              boolean cellHasFocus) {
                  String entry = (String)value;
                  if (isSelected || cellHasFocus) {
                       this.setBackground(list.getSelectionBackground());
                       setForeground(list.getSelectionForeground());
                  } else {
                       this.setBackground(list.getBackground());
                       setForeground(list.getForeground());
                  this.setText(entry);
                  if(isSelected || cellHasFocus){
                       if(constraint!=null &&combobox!=null &&
                                   constraint.getType() == Constrained.CONTROLLED_VOCABULARY){
                            String tooltip = ((ControlledVocabulary)constraint).getEntryDescription(entry);
                            if(tooltip==null || tooltip.equals("")){
                                 tooltip="";
                            list.setToolTipText(tooltip);
                  return this;
        }It seems to me that what I have to do is subclass the list used by the combobox and override the createToolTip() method. But how can I set the list used by the combobox? As far as I know the only time I can access the list is in the getListCellRendererComponent() method of the ListCellRenderer, in which the list is a parameter.
    Any ideas?
    Don

    Hello,
    <p>Have you seen this one?</p>
    Francois

  • FPM: Tooltip for the start button

    Hi FPM experts,
    I have one question/requirement concerning the start button within the FPM GAFfloorplan. I would like to add a tooltip to that button. I know that this button is part of the FPM and can not be influenced during design time.
    Nevertheless I hoped to be able to influence the button during runtime, namely by using the interface  IF_FPM_CNR_GAF and the method DEFINE_BUTTON. According to the Developers Guide for FPM Release 701 this should work for standard buttons. However I did not succeed in using this method.
    When taking a closer look at the signature I also became aware that there is one parameter missing in the signature of the interface that is described within the Developers Guide (IV_SCREEN): To the best of my knowledge this parameter is not available in 7.01/7.1 systems.
    Any help on that topic is appreciated!
    Thanks
    Christian

    Hi,
    Is this your previous thread?
    http://answers.microsoft.com/en-us/windows/forum/windows_7-desktop/how-to-display-tooltip-for-the-start-menu-items/c93e5457-0ac6-4bbd-8a54-ffacbeadf34f
    I have checked with some Windows 7 machines in workgroup, and they are all no infotips from the start menu items, this might by design.
    Besides, please take a look at the below links:
    Start Menu
    Best regards
    Michael
    Michael Shao
    TechNet Community Support

  • Tooltip for IR report(Apex 3.2)header column

    Hello Everyone,
    I need help in setting up a tooltip for report hearder in interactive reports. I tried the following methods:
    1) By assigning a div title for column Deptno(This code is taken from the html source of IR report column):
    <th id="DEPTNO" >
    <div id="apexir_DEPTNO" onclick="gReport.controls.widget(this.id)" style="">
    Deptno
    <div title="Tooltip text for first div">&lt/div>
    </div>&lt/th>
    2) With javascript & css : I put the following line on report header edit section:
    < a class="tooltip" href="#">Tooltip<span>This is the crazy little Easy Tooltip Text.</span></a>
    Nothing really solved my problem. Is there any easy way of resolving the above issue?
    Thanks in advance for your help.
    - Parveen
    Edited by: Parveen Sehrawat on Mar 14, 2012 2:58 PM

    Hi,
    Blog post example do not work with APEX 3.2
    By default on APEX 3.2 you do not have jQuery and dynamic actions.
    You can do same with APEX 3.2 if you use htmldbQuery plugin
    http://sourceforge.net/projects/htmldbquery/
    Integrate plugin and jQuery to APEX
    Then create page process before regions
    DECLARE
      l_sql VARCHAR2(32700);
    BEGIN
      l_sql := '
      SELECT COLUMN_ALIAS,
        HELP_TEXT
       FROM APEX_APPLICATION_PAGE_IR_COL
      WHERE APPLICATION_ID = :APP_ID
        AND PAGE_ID = :APP_PAGE_ID
        AND HELP_TEXT IS NOT NULL
      HTP.p ('<script type="text/javascript">');
      -- Create JSON object.
      HTP.prn ('var gIrColHelp = $u_eval(''(');
      APEX_UTIL.JSON_FROM_SQL(l_sql);
      HTP.prn (')'');');
      HTP.p ('</script>');
    END;Add to page HTML header
    <script type="text/javascript">
    $.htmldbIrReady(function(){
    $.each(gIrColHelp.row,function(i,jd){
      $($x("apexir_"+jd.COLUMN_ALIAS)).parent("th").attr({"title":jd.HELP_TEXT});
    </script>See working example
    http://actionet.homelinux.net/htmldb/lspdemo?p=220
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Edited by: jarola on Mar 15, 2012 4:53 PM

  • Tooltip for IR report header column

    Hello Everyone,
    I need help in setting up a tooltip for report hearder in interactive reports. I tried the following methods:
    1) By assigning a div title for column Deptno(This code is taken from the html source of IR report column):
    &lt;th id="DEPTNO" &gt;
    &lt;div id="apexir_DEPTNO" onclick="gReport.controls.widget(this.id)" style="text-align:center;"&gt;
    Deptno
    &lt;div title="Tooltip text for first div"&gt;&lt/div&gt;
    &lt;/div&gt;&lt/th&gt;
    2) With javascript & css : I put the following line on report header edit section:
    &lt; a class="tooltip" href="#"&gt;Tooltip&lt;span&gt;This is the crazy little Easy Tooltip Text.&lt;/span&gt;&lt;/a&gt;
    Nothing really solved my problem. Is there any easy way of resolving the above issue?
    Thanks in advance for your help.
    - Parveen

    Hi,
    This might help
    http://dbswh.webhop.net/dbswh/f?p=BLOG:READ:0::::ARTICLE:2311800346467196
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Setting tooltip for columns in a JTable

    Hi!
    I have a JTable inside a JScrollPane. How do I set tooltip for each columnheader of the JTable?
    I have noted that if I don�t have the JTable within the JScrollPane, the columnheaders are not shown.
    Regards
    Johan

    1) You need to set the tooptip text on the renderer for the column (yourTable.getColumnModel().getColumn(...).getHeaderRenderer()).
    2) The header is a separate component to the table. When you add a table to a scroll pane it automatically adds the header to the scroll pane too. You can get the component (yourTable.getTableHeader()) and add it to your own container if you wish.

  • How to configure Tooltips for Project Gantt charts

    Hi,
    I am trying to Display the title of the task as a tooltip for the Project Gantt Chart.
    I referred the documentation link and am trying to configure tooltipKeyLabels and tooltipKeys as specified in the link
    http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e12418/tagdoc/dvt_projectGantt.html
    but I could not get this to work.I am unsure about what the data object key refer to in the documentation.
    Is it the key of the text resource specified in the tooltip control hints or some other thing?
    Any body who has done this before,please share your ideas on this.
    I am using jdeveloper 11.1.1.3.0 with ADF-BC.
    Regards,
    Guna

    bing

  • Tooltip for chart's bar or line

    Hi,
    I need to set a tooltip for my chart's bars, so when the user hovers on each one the chart's bars, a tooltip popup and give that bar's value.  I heard there is no direct solution for this problem.  If so, can we solve this problem in any advanced tricky way or I should just look for some other reporting tool other that Crystal Reports to meet this requirement?
    Thanks,
    Al

    Thank you very much!  It's funny that I've been looking for something that already existed as you pointed.  By the way, can I change the bar's default tooltip's text? I just need to have the x-axis value on the tooltip.  I need to exclude the field name from the tooltip's text.  Thanks again.
    Regards,
    Al

  • Adding different tooltip for a column in table??

    Hi here,
    I have read the similar title "Adding ToolTip for individual cell in the table".
    The method that use "tableModel" and "override getToolTipText" for individual cell is useful for individual cell with tooltip that i have tried.
    How could i get the tooltip for each columns and show every row value on each tooltip.I wish when mouse moved above a column and the column could show all of that column's row value.
    Please help me.
    Thanks..

    your explanation sounds a bit confusing but if i got you right
    you could do something like this in your table
    public String getToolTipText(MouseEvent me)
          int row = this.rowAtPoint(me.getPoint());
          StringBuffer tooltip = new StringBuffer();
          for(int i=0; i<getColumnCount; i++)
             tooltip.append(getValueAt(row, i).toString());
          return tooltip.toString();
       }

  • Set a tooltip for a shape, not a button

    Hi everybody,
    Hope you are all ok wherever you are :)
    I have this little problem guys; I want to set a tooltip button in my application but the problem is that i'm not using buttons but shapes instead, in which shapes i've added mouse click handle code.
    I need when the mouse goes over these shapes-buttons i have, some tooltip text to be displayed. I've tried to create a rectangle and display the small text i want into that rectangle and then call repaint for restoring the program to the previous state before the tooltip display, but unfortunately it is too slow.
    Can you please help me out of that? Can you give a way of setting tooltips for shapes instead of buttons?
    Any help would be appreciated.
    Thanks,
    -John

    Your trying to set a tooltip for a given area on some JComponent defined by a Shape which holds the points that make up the border of the Shape, like GeneralPath or something like that? Is that what you mean? I'm not sure but I think you can use Shape.contains(Point2D ...) without actually have drawn the Shape, so that you can test where the mouse is on your JComponent, then check contains to see if a tooltip needs to be displayed. You'll have to write your own tooltip frame that's not dependent on a JComponent, but thats fairly straightforward. Don't know if this is any help to you, but its a possibility.
    Tom
    ioannisc: the OP talks about the use of Shape's, where did subclasses of JComponent come into it?!

Maybe you are looking for

  • How can I run Runtime.exec command in Java To invoke several other javas?

    Dear Friends: I met a problem when I want to use a Java program to run other java processes by Runtime.exec command, How can I run Runtime.exec command in Java To invoke several other java processes?? see code below, I want to use HelloHappyCall to c

  • Adding New fields in Pricing

    Hi, I have to add new fields in price catalog (i.E MaterialGroup1 to Material group5  MVGR1 .. MVGR5 ) .Althought the fields has been hadded in catalog and access sequence , pricing procedure is not picking up data from sales order to determin the pr

  • How to hook my iPad2 up to my Sony HD tv

    How do I hook up my iPad2 to my Sony HD tv?

  • Apple TV Imported pictures have POOR quality!! HELP!!!

    I am downloading pictures to enhance my slideshow/screensaver and they all come out with poor resolution. I have tried various sizes and cant figure out what size pictures I need or what resolution????!!! I have not found a picture that comes up HD c

  • Implementing Observeable pattern:

    Hi, i am having difficulty implementing Observeable and observer pattern. Please, can anyone help? I want to have a small program (no interface required) which will let an online user login with their account number and password. After loging in, use