My original plan today was to learn how to use the JProgressBar
, but now I am stuck with a new problem which I was not expecting. So here is how my JFrame
looks like right now.
The problem is that the JTextField
right under the JTextArea
is not wrapping around. It is going beyond the size of the JFrame
. I want it to resize relative to the JFrame
. How can i do that? I have tried the JLabel
but it does the same thing, only i开发者_如何学运维t adds ellipses in the end where the text overflows.
Try using a JTextArea
if you intend for the field to expand vertically to accommodate the text.
JTextField
s are intended for a single line of text.
精彩评论