@@ -68,6 +68,8 @@ public void setCacheUsed( boolean cacheUsed ) {
68
68
}
69
69
70
70
void setRowsScrolling ( boolean rowsScrolling ) {
71
+ if ( !isCacheUsed () )
72
+ rowsScrolling = true ;
71
73
if ( !this .rowsScrolling && rowsScrolling )
72
74
clearCellImagesCache ();
73
75
this .rowsScrolling = rowsScrolling ;
@@ -387,8 +389,10 @@ private void paintDraggedArea( Graphics g, int rMin, int rMax, JBroTableColumn d
387
389
}
388
390
Graphics gg ;
389
391
if ( isCacheUsed () ) {
390
- draggedAreaCache = new BufferedImage ( vacatedColumnRect .width + 1 , vacatedColumnRect .height , BufferedImage .TYPE_INT_ARGB );
392
+ draggedAreaCache = new BufferedImage ( vacatedColumnRect .width + 1 , vacatedColumnRect .height , BufferedImage .TYPE_INT_RGB );
391
393
gg = draggedAreaCache .getGraphics ();
394
+ gg .setColor ( table .getParent ().getBackground () );
395
+ gg .fillRect ( 0 , 0 , vacatedColumnRect .width + 1 , vacatedColumnRect .height );
392
396
gg .translate ( 1 - vacatedColumnRect .x , -vacatedColumnRect .y );
393
397
} else
394
398
gg = g ;
@@ -488,8 +492,10 @@ private void paintCell( Graphics g, Rectangle cellRect, int row, int column, Obj
488
492
gg = g ;
489
493
image = null ;
490
494
} else {
491
- image = new BufferedImage ( cellRect .width , cellRect .height , BufferedImage .TYPE_INT_ARGB );
495
+ image = new BufferedImage ( cellRect .width , cellRect .height , BufferedImage .TYPE_INT_RGB );
492
496
gg = image .getGraphics ();
497
+ gg .setColor ( table .getParent ().getBackground () );
498
+ gg .fillRect ( 0 , 0 , cellRect .width , cellRect .height );
493
499
gg .translate ( -cellRect .x , -cellRect .y );
494
500
}
495
501
gg .setColor ( header != null ? header .getBackground () : isSelected ? table .getSelectionBackground () : table .getBackground () );
0 commit comments