Question

In my Java project with WindowBuilder Pro. I use methods to return a values then out.setText(value_1); but when I try to out.setText(value_2); a value_1 has been removed.

My solution is to String show = out.setText(value_1).concat(value_2) and then out.setText(show);. Does anyone have another suggestions/solutions of this problem?

Thanks.

Was it helpful?

Solution

You could consider using a JTextArea instead of a JTextField. A text area is a multi-line text field and has an append(String text) method.

OTHER TIPS

Its pretty simple. Try this :

out.setText(out.getText()+value_2);

That's it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top