doha786 0 Light Poster

hi,
first time i am using 2D array, so not much familiar with this(just learning).
below, in my program trying to return the values of 2D array that i m calling from different class and showing in JTable.

its working but when i am using condition then getting some null/emty row in the middle of JTable..
how can i omit and sort the row during return ?

public String[][] process(String searchName, String value){
..
FileReader reader;                      
String[][] row=null;

Map<String, File> names = new HashMap<String, File>();

try{  
..
...

 row = new String[names.keySet().size()][];
int i = 0;
 for (String found: names.keySet()) {
..
..
//row=(found+file.getName()+file.length());

[B]if(file.length>1024)[/B]{
row[i] =new String[]{found, file.getName(), Long.toString(file.length())};
i++;
//if (row[names.keySet().size()] == null && row[i] == null) {	}

}
}
catch(Exception e) {e.printStackTrace() }
 
return row;

anybody pls help me to figure out this...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.