I have a border layout, and a JPanel on the right. The JPanel has absolute layout, and it doesn't contain anything because I'm using it to draw graphics (overriding paintComponent(Graphics g))
The problem is that the panel doesn't show (it's there but like 1 pixel wide). I tried to setSize on the panel.. but that doesn't work..
How do I do it?
frame = new JFrame();
frame.setBounds(100, 100, 450, 300);
JPanel panelCenter = new JPanel();
panelRight = new ActorDrawer();
frame.getContentPane().add(panelRight, BorderLayout.EAST);
panelRight.setSize(200, 400);
panelRight.setLayout(null);
frame.getContentPane().add(panelCenter, BorderLayout.CENTER);
frame.getContentPane().add(panelBottom, BorderLayout.SOUTH);
table = new JTable(new MyTableModel());
JScrollPane scrollPane = new JScrollPane(table);
table.setFillsViewportHeight(true);
panelCenter.add(scrollPane);