This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes colors for first six rows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "colors for first six rows" Watch "colors for first six rows" New topic
Author

colors for first six rows

Ganeshkumar cheekati
Ranch Hand

Joined: Oct 13, 2008
Posts: 362
if(lstData.size()>0){
String sTdColor = "#D2D6D9";
int Q1index = 0,Q2index = 0,Q3index = 0,Q4index = 0,Q5index = 0,Q6index = 0 ;
for(int i=0;i<lstData.size();i++){
if((i%2)==0){
System.out.println("i value="+i);
System.out.println("i%2 value="+(i%2));
System.out.println("number for colour"+((i%2)==0));
sTdColor = "#ffebbb";
}else{
System.out.println("i value="+i);
System.out.println("i%2 value="+(i%2));
System.out.println("number for colour"+((i%2)==0));
sTdColor = "#fcf9f2";
}>


SCJP5 and SCWCD1.5
Think Twice Act Wise...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60737
    
  65

And?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: colors for first six rows
 
Similar Threads
Euler12
getter not running
MultiDimenaional Array sort
Program to print numbers from 0 to 100 in words