>Hi,

>I have some questions regarding JTable. You folks might help.

>- Header of my JTable is not visible. Once I add it to a scrollpane header
becomes visible. Is it >necessary to add JTable to a
>scrollpane ?

No its not necessary but it is usual.  The header is a
separate component and adding the JTable to a JScrollPane
causes that header component (a JTableHeader) to be added
to the column header portion of the scroll pane.

If you don't want the table in a JScrollPane you can add
the header directly (getTableHeader() on JTable) and add
it to whatever layout you're using.

>- I have added a MouseListener to my JTable. I can get the column where the
mouse is clicked. Is there >any any method to get row
>also ?

rowAtPoint method on JTable.


Regards

Dave Wathen
Goldman Sachs Asset Management
3rd Floor, Procession House
55 Ludgate Hill
London EC4M 7JN
+44 (0)20-7774-2998

It is not necessary to understand things in order to argue about them.
(Caron de Beaumarchais)

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to