JPanel & components change position automatically
Hi I am working on swing application but I am facing one problem. When I first run application JPanel is positioned at proper position where I decided to set with components inside. But problem occur when I minimize & again maximize frame window jpanel automatically changes it's position. Below images shows that difference As we can see on second image components changes it's position automatically. For this I written below code, jpanel_addPurchase = new JPanel(); jpanel_addPurchase.setLayout(null); jpanel_addPurchase.setBounds(400, 0, 500, 500); jpanel_addPurchase.setBackground(Color.white);