i called a text from databse to jlabel, but the text is in 1 row, i want to split the text
try {
String sql="SELECT Leírás FROM Filmlista WHERE Cím like'Fűrész'";
PreparedStatement pst = conn.prepareStatement(sql);
ResultSet rs = pst.executeQuery();
while (rs.next()) {
String name=rs.getString("Leírás");
foglab1.setText(name);
String[] parts=name.split("@");
String part1=parts[0];
String part2=parts[1];
}
so i have a long text and i want split it when he found @ character
Use HTML Luke :)
label.setText("<html>" + part1 + "<br>" + part2 + "</html>");
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments