Hi,
I want to show in a frame some strings that may change at runtime;
I've used a JLabel.
ex.
JLabel label = new JLabel("It's a test");
...
...
...addActionListener...
label.setText("It is not a test;");
Now when the string in the JLabel change, change also the label width,
and this changes the frame size.
I've use a GridBagLayout.
Isn't possible to assign a constant width to a label?
Alternatively, what other components can I use to show string that may change at runtime, without the frame resize problem?
I don't want to use a JTextField because I don't have to process a string.
Thank you in advance.
MargNat