Program of voting details of individual and total candidates appeared

ok so im making this program. it lets the user enter a number of candidates, then their names, then how many votes each candidate received.

i want the program to out put the total number of votes. how much each candidate received and who the winner is. i also want it to show what percentage of the total votes each candidate received.

i need help with the precentage part and i also need help with the displaying part.

below is a copy of my code . . . . in bold is the output line of code. i need help writing a long of code that has everything that i mentioned above in it.

thanks . . .

Code :

package test1;
import javax.swing.*;
public class Test1 {
public static void main(String[] args) {
int winIND;
int numCand; //number of candidates
int numVotes; //number of votes
int best = 0; //highest number of votes
int voteTotal; //total number of votes
//int total; //sum of votes
String strName; //name of candidate
String strNumVote; //number of votes for each candidate
String strNumCand; // get the number of candidates from user
//get the number of candidates
strNumCand = JOptionPane.showInputDialog("Please Enter Number of Candidates: ");
numCand = Integer.parseInt(strNumCand);
int votes[] = new int[numCand];
for (int i=0; i<numCand; i++) {
strName = JOptionPane.showInputDialog("Enter Name of Candidate: ");
strNumVote = JOptionPane.showInputDialog("Please enter total number of votes: ");
votes[i] = Integer.parseInt(strNumVote);
int total = total + votes[i];
if (votes[i] > best)
best = votes[i];
}
int total = sumVotes(votes);
int k = winIndex(votes);
[B]JOptionPane.showMessageDialog(null, "Total votes: " + total + "/n The winner is: " + strName[k]);[/B]
}
public static int sumVotes(int a[]) {
int sum = 0;
for (int j = 0; j<a.length; j++)
{
sum += a[j];
}
return sum;
}
public static int winIndex(int votes[]) {
int winIND = 0;
for(int i = 0; i<votes.length; i++)
{
if(votes[i]>votes[winIND]);
winIND = i;
}
return winIND;
}
}