hi.
I have a JLabel which displays what is being written in a corresponding JTextArea.
Of course with JTextArea there is no problem line wrapping, but how would I acheive the same with a JLabel, I really can't think of how the single line String it displays can be wrapped.
Is there a way of telling when the last character added to the label is near the edge of the label's viewable contants, and then add a "\n" newline character??
--------------------------------------------------------
One other question regarding the JLabel is that when a character is enetered in the JTextArea it should appear in the JLabel, however it is not until the next character is entered that the last character appears???? anyway of getting around this???
---------code----------------------
stringMessage = textArea.getText();
label.setText(stringMsg);
-----------------------------------
any suggestions for these two questions are very welcome!
cheers
Oxy
we are all of us living in the gutter.
But some of us are looking at the stars.
I have a JLabel which displays what is being written in a corresponding JTextArea.
Of course with JTextArea there is no problem line wrapping, but how would I acheive the same with a JLabel, I really can't think of how the single line String it displays can be wrapped.
Is there a way of telling when the last character added to the label is near the edge of the label's viewable contants, and then add a "\n" newline character??
--------------------------------------------------------
One other question regarding the JLabel is that when a character is enetered in the JTextArea it should appear in the JLabel, however it is not until the next character is entered that the last character appears???? anyway of getting around this???
---------code----------------------
stringMessage = textArea.getText();
label.setText(stringMsg);
-----------------------------------
any suggestions for these two questions are very welcome!
cheers
Oxy
we are all of us living in the gutter.
But some of us are looking at the stars.