ToolTip is not being shown for all labels

public void mouseEntered(MouseEvent e) {
            		
            		//for(PathInfo p2:log1.getPathinfolist())
            	    //{
            	for(LogProcess lp1:lo)
            	{   lp1=lo.get(xx);
            		String ename=e.getComponent().getName();
            		//System.out.println(ename);
            		 
            		for(PathInfo p2:lp1.getPathinfolist())
            	    {
            			if(lp1.getAuth().equals(ename))
                	    {
            	    	d1d.add(p2.getFilepath());
            	    	String toolTip ="<html>";
                		for(String line : d1d)
                		{
                		  toolTip += line +"<br>";
                		}
                		toolTip += "</html>";
            			label.setToolTipText(toolTip);
            			
            			//System.out.println("Hover Activated");
            	    	}
            	    }
            	}
            	    	d1d.clear();
            	   zz++;
            	    //}
            		
            	}

Open in new window



In my program labels are added to a panel based on the contents of a linked list.I wanted to implement hover for each label,but comparing values based on the label name and the linked list.However it does not quite seem to work.Can someone help me to find the mistake?
LVL 1
akashsureshAsked:
Who is Participating?
 
CEHJCommented:
label.setToolTipText(toolTip);

Open in new window


Only one label has its text set repeatedly, finally getting the last loop value
0
 
CEHJCommented:
:)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.