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 > UI , Look and Feel, Colors, Navigation, font, Locale Post New Topic   Post A Reply
spacing between cell printer friendly version
next newest post | next oldest post
Author Messages
Aurelio Balgera
Unregistered
Edit or delete this message Reply w/Quote
Posted Saturday, July 9, 2005 @ 23:34:50  

I am very interested in QuickTable and I am trying it. But I cannot set the interspacing between cell in table. The data are too close to the grid. There is a way to set the cell interspacing ???
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 Saturday, July 9, 2005 @ 23:36:47  

use the following method to set the height and width of the space between cells

dbTable.getTable().setIntercellSpacing(Dimension intercellSpacing)

aurelio7
Private

Gender: Unspecified
Location:
Registered: Jul 2005
Status: Offline
Posts: 5

Click here to see the profile for aurelio7 Send email to aurelio7 Send private message to aurelio7 Find more posts by aurelio7 Edit or delete this message Reply w/Quote
Posted Monday, July 11, 2005 @ 15:48:25  

Using this method you end up having gaps between the headers and 'gaps' on the highlighted row
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 Monday, July 11, 2005 @ 21:24:37  

what is the Dimension parameter value which you are using?

If you want to have space between columns only and not rows, try
dbTable.getTable().setIntercellSpacing(new Dimension(5,0))

In addition to setIntercellSpacing(), You have the following options in JTable. Use the appropriate method as you need.

public void setRowMargin(int rowMargin) Sets the amount of empty space between cells in adjacent rows.

public void setRowHeight(int rowHeight) Sets the height, in pixels, of all cells to rowHeight, revalidates, and repaints. The height of the cells will be equal to the row height minus the row margin.

public void setRowHeight(int row, int rowHeight) Sets the height for a specific row to rowHeight, revalidates, and repaints. The height of the cells in this row will be equal to the row height minus the row margin.

aurelio7
Private

Gender: Unspecified
Location:
Registered: Jul 2005
Status: Offline
Posts: 5

Click here to see the profile for aurelio7 Send email to aurelio7 Send private message to aurelio7 Find more posts by aurelio7 Edit or delete this message Reply w/Quote
Posted Tuesday, July 12, 2005 @ 07:47:24  

I need something like setColumnMargin.....But I resolved. I modified the DBTableCellRenderer in this way:

at the bottom oh method

public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column)
...
...
...
...

comp.setBorder(new CompoundBorder(new EmptyBorder(new Insets(1,4,1,4)),comp.getBorder()));

return comp

that works fine. I you have any othe suggestion.....Thanks a lot.

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