I'm trying to read from file and insert in a row, after inserting I'm having this :
[Ljava.lang.String;@7f059c04
[Ljava.lang.String;@855c8af
The Listener, and BufferRead and Inserting file read.
String filepath = "C:\\imdoingjava\\Java3-Projet\\valuesarticles.txt";
File file = new File(filepath);
private class okListener implements ActionListener{
public void actionPerformed(ActionEvent event){
try{
BufferedReader br = new BufferedReader(new FileReader(file));
Object [] tableLines = br.lines().toArray();
for(int i=0; i<tableLines.length; i++){
String line = tableLines[i].toString().trim();
String [] dataRow = line.split("\n");
model.insertRow(0, new Object[] {"", "", dataRow ,""});
}
}
catch(FileNotFoundException fo){
fo.getMessage();
}
}
If I used model.insertRow(0, dataRow);
which I commented it, it works but it inserts it in the first column, and I want it in the third.