// Draw the ids\r
pg.setClip(0,0,pwidth, noChunksOnPage*chunkHeight);\r
\r
- int row = pi*noChunksOnPage;\r
pg.setColor(Color.black);\r
- for(int ypos=2*av.charHeight;\r
- ypos <= pheight && row*chunkWidth<da.getWidth();\r
- ypos += chunkHeight, row++ )\r
+\r
+ int rowSize = av.getEndRes() - av.getStartRes();\r
+ // Draw the rest of the panels\r
+\r
+ for(int ypos=2*av.charHeight, row=av.getEndRes(); row<av.alignment.getWidth();\r
+ ypos += av.chunkHeight, row+=rowSize )\r
{\r
for (int i = 0; i < endy; i++)\r
{\r