java - How to resize row height of JXTable -


I'm writing a piece of code to display images in the database from JScript, everything works fine . I have determined the line that the height of that table, now I want to change the row height dynamically using the mouse.

How to get it.

I know that SetroHight (100) will be useful, how can I get value in it dynamically?

Thank you inadvance

Here are some code that I wrote the web some time ago: / P>

  import javax.swing. *; Import javax.swing.table. *; Import javax.swing.event.MouseInputAdapter; Import java.awt. *; Import java.awt.event.MouseEvent; Public class tablewareSocial mouseInputEditor {public status cursor resize cursor = cursor.getvalued cursor (cursor.NOSSIZE_CURSOR); Private int mouseoffsets, resizing rouge; Private cursor other cursor = resize cursor; Private jetty table; Public TableRowResizer (JTable table) {this.table = table; table.addMouseListener (this); Table.addMouseMotionListener (this); } Private-int Rousing (Point P) {Returning Recessing RO (P, Table.Oottepoint (P)); } Private Inquisition Row (Point P, Ent Row) {if (line == -1) {return -1; } Int col = table.columnAtPoint (p); If (disciple == - 1) return -1; Rectangle r = table. Gateclick (line, call, true); R. Grove (0, -3); If (RC Continence (P)) returns -1; Int'l Midpoint = RI + R Height / 2; Int rowIndex = (PI  = 0) {int newHeight = mouseY - mouseYoffset; if (newhite> gt;) {table.setRowHeight (resize, newhigh) ;}}}}   

You add it to the table by using it:

  New tableraser (table);    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -