craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > Events/Actions Post New Topic   Post A Reply
Column auto resize on double clicking table header margin printer friendly version
next newest post | next oldest post
Author Messages
sandeep.bhatt
Private

Gender: Unspecified
Location:
Registered: Apr 2007
Status: Offline
Posts: 9

Click here to see the profile for sandeep.bhatt Send email to sandeep.bhatt Send private message to sandeep.bhatt Find more posts by sandeep.bhatt Edit or delete this message Reply w/Quote
Posted Monday, May 21, 2007 @ 02:27:33  

Hi all,

I am trying to auto resize columns on double clicking the table header margin.

i want to know:-

1> How to capture the double click event on a table header margin.
2> How to then resze the column

Thanks in advance.

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Tuesday, May 22, 2007 @ 20:55:17  

Add a mouse listener to header and listen for double click event

dbTable.getTableHeader().addMouseListener(yourMouseListener);

to resize the column, call
column.setWidth(newWidth);

Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios