I have a JLabel that I require to change dynamically when a button is pressed. I am using JLabel.setText(s)
However, it is not working. I've tried:
JLabel.repaint()
JLabel.validate()
JLabel.revalidate()
The thing I find strange is that it works fine when I don't set the size of the JLabel using any of:
JLabel.setPrefferedSize()
JLabel.setMinimumSize()
JLabel.setSize()
Can anyone help me with why it isn't working after I set one of the size properties?