0
comment casser la chaîne à chaque 100e caractères dans Jlable. j'ai essayécomment adapter Large String dans jLabel
String str = "rgwueiiiiiiiiiiiiiiiiiiiiiigthytjtjhyfghgfthythtyrhyrhythryhiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiithurgtihiugtgoeim9yv8umv9,u,j89,9v8juv98yliv9ki9kj9bjj9iki9hkiykhvivjkinv";
String parsedStr = str.replaceAll("(.{100})", "$1\n");
System.out.println(parsedStr);
jLable1.getPreferredSize();
jLable1.setText(str);
chaîne est brisée. mais il ne montre pas en Jlable comme cassé
Essayez HTML: 'jLabel.setText ("" + str);' –
a résolu le problème .. en utilisant jLabel.setText ("" + parsedStr + "
"); merci d'ailleurs –
@pawansharma Ajoutez-le comme réponse personnelle;) –