posted 18 years ago
As a follow up to Nathan's post....if you want very explicit control over where your label appears on the screen, use GridBagLayout. Its the more complicated of all layouts, but its the only way you can essentially boss the jvm around and make your components appear where you want them to consistently. IMHO, the only other Layout class that has any value whatsoever is BoxLayout. The rest of them pretty much produce fairly amateur looking screens (again, in my opinion).
To Nathan's point.....NULL layout will work, but only on one screen dimension/resolution/platform. It also will cause issues on repaint, i.e. if the user minimizes and maximizes the screen (because it loses the setbounds property once the "bounds" no longer exist, which they wont on a minimize)