JPanel panel = new JPanel();
panel.setLayout(null);
JButton button = new JButton();
button.setSize(30, 30);
button.setLocation(30, 30);
panel.add(button);
I dont know but sometimes button appeares itself (as i understand it has to) and sometimes button does not appear until mouse hovers it. Can you explain please is it bug or i do something wrong.
The method
is a solution