将Object [] []转换为String? Java Swing

时间:2012-12-15 01:32:10

标签: java string swing object jtextarea

我需要转换一个如下所示的Object [] []:

Object[][] numbers =
  {"1", "12-22", "12-22"},
  {"2", "12-22", "11-14"},
  {"3", "12-22", "11-14"};

我试过了:

m1.textArea.setText((b1.returnNumbers).toString());

1 个答案:

答案 0 :(得分:4)

您可以使用deepToString方法:

m1.textArea.setText(Arrays.deepToString(b1.returnNumbers));