i 有2个JTextArea,其中1个载有统法协会编码标准点,如这一u0645,想另1个JTextArea
显示统法协会编码点的特征。 但是,在将这一法典提交JTextArea时,它显示:
法典不明确,如果一成文法指JTextArea setText法,它就可直接操作。
为什么? 谁可以把《刑法》的“强点”从JTextArea传递到另一个?
感谢
i 有2个JTextArea,其中1个载有统法协会编码标准点,如这一u0645,想另1个JTextArea
显示统法协会编码点的特征。 但是,在将这一法典提交JTextArea时,它显示:
法典不明确,如果一成文法指JTextArea setText法,它就可直接操作。
为什么? 谁可以把《刑法》的“强点”从JTextArea传递到另一个?
感谢
该守则具有特性,在其他文本领域,对应的“统一编码”对应法:
import java.awt.*;
import javax.swing.*;
public class FrameTest {
public static void main(String[] args) {
JFrame jf = new JFrame("Demo");
Container cp = jf.getContentPane();
cp.setLayout(new BorderLayout());
JTextArea ta1 = new JTextArea(20, 20);
JTextArea ta2 = new JTextArea(20, 20);
Character c = u0645 ;
ta1.setText("" + c);
String s = String.format("\%04x", (int) c.charValue());
ta2.setText(s);
cp.add(ta1, BorderLayout.WEST);
cp.add(ta2, BorderLayout.EAST);
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jf.setSize(500, 100);
jf.setVisible(true);
}
}
因此,如果你有这么长的此类特征,那么你需要<>通过特性说明的流体”(,(使用getCharAt(int)
或getChars(
),处理每一特性的String.format(>/%04x)(int) c.charValue());
,并将结果与目标指示相匹配。 (先使用<代码>StringBuffer)
JTextArea text=new JTextArea();
String dir=text.getText();
JTextArea text2=new JTextArea();
text2.setText(dir);
但是,这并不奏效,而是含有一些法典要点。 直接通过密码
它的工作!
如果一成一成不变的代码,它就可直接操作。
如果你这样说的话,就意味着什么,如<条码>myTextArea.setText(u0645 ),那么这个问题就很明显:
>。 (Unicode nature U+0645 ARABIC LETTER MEEM) 同一地点。
因此,以下两条行完全相同:
myTextArea.setText( u0645 )
myTextArea.setText( م )
之所以如此,是因为在汇编<><>t>>>>>_u0645时,该编号改为“Unicode nature”。
如果 you强含有6个特性,则这种情况完全不同。 这种强硬可作为“Java Stringlich”字字面/u0645”
(指避免编篡人解释“Unicode”越轨的双重回击)。
在这种情况下,你可以 gr第三至最后特性(/u0645>,subString(2)
),将六分数(Integer.parseInt(String, 16)
)和结果投到char/code>。 然后,请标有<代码>char
值,其中包含统法协会的实际编码性质。
Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...
Check this, List<String> list = new ArrayList<String>(); for (int i = 0; i < 10000; i++) { String value = (""+UUID.randomUUID().getLeastSignificantBits()).substring(3, ...
I am in the middle of solving a problem where I think it s best suited for a decorator and a state pattern. The high level setting is something like a sandwich maker and dispenser, where I have a set ...
I have been trying to execute a MS SQL Server stored procedure via JDBC today and have been unsuccessful thus far. The stored procedure has 1 input and 1 output parameter. With every combination I ...
I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...
If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...
I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....
I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...