Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 绝地武士方格中的矩阵_Java_Html_Swing_Jeditorpane - Fatal编程技术网

Java 绝地武士方格中的矩阵

Java 绝地武士方格中的矩阵,java,html,swing,jeditorpane,Java,Html,Swing,Jeditorpane,我想在绝地武士窗格中“画”一个矩阵。 我正在使用以下代码: public String addMatrix2(String a[][]){ String text = "<table style=\"color:#000\"><tr><td><table border=0 cellpadding=0 cellspacing=0px style=\"border-left:1px solid #000; border-right:1px solid

我想在绝地武士窗格中“画”一个矩阵。 我正在使用以下代码:

public String addMatrix2(String a[][]){
    String text = "<table style=\"color:#000\"><tr><td><table border=0 cellpadding=0 cellspacing=0px style=\"border-left:1px solid #000; border-right:1px solid #000; color:#000\"><tr>"+
    "<td style =\"border-top:1px solid #000; border-bottom:1px solid #000;\">&nbsp</td><td><table border=0 cellpadding=0 cellspacing=0 style=\"color:#000;\">";

    for(int i=0 ; i< a.length ; i++){
            text += "<tr>";
            for(int j=0 ; j<a[1].length ; j++){
                    text += "<td align=\"center\" valign=\"center\" width=30>"+a[i][j]+"</td>";
            }
            text += "</tr>";
    }
    text +="</table></td><td style =\"border-top:1px solid #000; border-bottom:1px solid #000;\">&nbsp</td></tr></table></td></tr></table>";
    //texto +=text;
    return text;
}
公共字符串addMatrix2(字符串a[]{
String text=“”+
“;
for(int i=0;i对于(int j=0;jj,输出中看不到的代码中的括号在哪里?一个不相关的提示:如果在html中使用单引号,请避免反向链接:
text=“
…为了更快地获得更好的帮助,请发布一个.BTW-
\”color:\35000\“
我的理解是Java不理解3个字母版本的颜色规范。它实际上是黑色的吗?顺便说一句-最好更改
j