Component on JPanel not showing when setLayout(null)
Someone can tell why the combobox is not showing ? I have a Controller: public class TestController extends JPanel { TestView cgView; public TestController() { setLayout(null); cgView=new TestView(); add(cgView); } public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { JFrame fr = new JFrame("testt"); fr.setSize(1200,1000); fr.setResizable(false); TestController cgc=new TestController(); fr.setBackground(Color.white); fr.setVisible(true); fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); fr.add(cgc); } }); } } And a view public class TestView