posted 14 years ago
Hi, I am trying to add a JPanel to the center region of a BorderLayout. The JPanel should be 200 by 200, but when I add it directly to the BorderLayout, it is stretched out. I need it to be just 200 by 200 pixels. I have tried adding another JPanel with a FlowLayout, and adding my JPanel to that, then adding that to the BorderLayout. But when I do that, my JPanel shrinks down to maybe 10 by 10 pixels. This is frustrating, I hate swing. It seems like it never works quite the way it's supposed to... Anyway, is there something I'm missing? Here's my code: