javax.swing.JTable tableEnv = new javax.swing.JTable();
tableEnv.setValueAt((Object)EnvText1, 0, 0);
String EnvText1 = "ENERGY USE AND GREENHOUSE EMISSIONS" + "\n " + "What effect will the proposal have on energy" + "\n " + "consumption and greenhouse gas emissions";
I am trying to insert a string in row 0, column 0 of the above JTable. But EnvText1's new line characters ("\n") get lost and EnvText1 is one contnuous string. Is there a way to insert a string in a JTable field so that nicely folds on \n ??
tableEnv.setValueAt((Object)EnvText1, 0, 0);
String EnvText1 = "ENERGY USE AND GREENHOUSE EMISSIONS" + "\n " + "What effect will the proposal have on energy" + "\n " + "consumption and greenhouse gas emissions";
I am trying to insert a string in row 0, column 0 of the above JTable. But EnvText1's new line characters ("\n") get lost and EnvText1 is one contnuous string. Is there a way to insert a string in a JTable field so that nicely folds on \n ??