This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I've got one of those big questions that you never think about except at the outset of a project. I realized that, for my current project, I really don't want any kind of resizing or moving around of components in the JFrame. For complicated reasons, I just need to have everything in a set place, without any changes in position because something new is a bit bigger or smaller. I've done a halfway decent job of getting Swing to do that, but it occurred to me that the whole design philosophy behind Swing may have been to provide easily resizable windows -- and if that is true, then an application that doesn't tolerate window resizing would be better off using AWT, right?
My application is close to complete, but now I'm fighting all those pesky little repositionings that Swing loves to do. Would I be better off just stripping the leading J from all those components?
Chris Crawford wrote:..., but it occurred to me that the whole design philosophy behind Swing may have been to provide easily resizable windows -- and if that is true, then an application that doesn't tolerate window resizing would be better off using AWT, right?
AWT relies on the underlying OS for component "peers" where as Swing provides its own.
Imagine a button. Whenever the UI needs to render a button, AWT will ask the OS "give me a button to render". On the other hand, Swing will render the button itself.
This article will be an interesting read.
If you can share more information on what you are exactly trying to achieve, we can help you better.
In the meanwhile, I will move this thread over to the UI forums.