Reputation: 419
I've a Java Swing application which is working as intended in Windows. However in Linux (RedHat7) I'm having the following issues;
JButton
is clicked which is responsible for changing components (like buttons or labels) in a JPanel
, new components are not fully painted until I mouse-over them.These are all working fine in Windows but not in Linux. Can anyone help me to understand what might be going wrong here?
Upvotes: 0
Views: 149
Reputation: 324118
2.Whenever a JButton is clicked which is responsible for changing components (like buttons or labels) in a JPanel, new components are not fully painted until I mouse-over them.
Make sure you are using layout managers.
When you add components to a visible GUI the basic code is:
panel.add(...);
panel.revalidate();
panel.repaint();
Upvotes: 1