Search code examples
javaswingappendjlabelsettext

append feature in JLabel like in JTextArea java?


is there a append feature for JLabel, like in JTextArea?

JTextArea Text = new JTextArea("including; "); 
Text.append("button1,");

Solution

  • No, but you can do something like this each time you want to add text

    label.setText(label.getText() + "text u want to append");