How can I return Icon Name from a certain Cell in a JavaTable

I'm attempting to test a Java Application using Mercury's Quick Test Professional. I've figure out how to get the font from the JavaTable, but I'm unable to get the Icon. Below is the code that I'm using, could you tell me what I'm doing wrong.

'Set Object Properties

Set Window_Property = Description.Create()

Window_Property ("title").Value = "EBS BenAdmin"

Window_Property ("label").Value = "EBS BenAdmin"

RegisterUserFunc "JavaTable", "GetCellIcon", "GetCellIcon"

'Retrieve Font for Cell

CellIconName = JavaWindow(Window_Property).JavaTable("developer name:=table.adjudication.items").GetCellIcon(1,1)

Msgbox CellIconName

'#######################################################################################################################################################

'Type: Function

'Written by: Darin Duphorn

'Purpose: GetCellIconfrom JavaTable Cell

'Date Aug 15, 2006

'#######################################################################################################################################################

Function GetCellIcon(JTable, row, col)

Dim cc, Icon

' get font of the cell using cell renderer

Set cc = JTable.Object.getRenderer(row,col)

Set Icon = cc.DefaultTableCellRenderer() 'Class

'Method

GetCellIcon= cc.icon.GetIcon()

End Function

[1432 byte] By [ddad01a] at [2007-10-3 2:51:31]
# 1

Sorry, This is what my code looks like. I was trying something and didn't change it.

'Set Object Properties

Set Window_Property = Description.Create()

Window_Property ("title").Value = "EBS BenAdmin"

Window_Property ("label").Value = "EBS BenAdmin"

RegisterUserFunc "JavaTable", "GetCellIcon", "GetCellIcon"

'Retrieve Font for Cell

CellIconName = JavaWindow(Window_Property).JavaTable("developer name:=table.adjudication.items").GetCellIcon(1,1)

Msgbox CellIconName

'#######################################################################################################################################################

'Type: Function

'Written by: Darin Duphorn

'Purpose: GetCellIconfrom JavaTable Cell

'Date Aug 15, 2006

'#######################################################################################################################################################

Function GetCellIcon(JTable, row, col)

Dim cc, Icon

' get font of the cell using cell renderer

Set cc = JTable.Object.getCellRenderer(row,col)

Set Icon = cc.getIcon()

'Method

GetCellIcon= icon.GetName

End Function

ddad01a at 2007-7-14 20:40:24 > top of Java-index,Archived Forums,Debugging Tools and Techniques...