应用程序GUI设计的最佳提示是什么?您在设计或重构GUI应用程序时遵循哪些模式?
解决方案使用布局管理器。你可能会认为现在只要将所有东西都放在硬编码位置上(特别是如果你使用图形布局工具)更简单,但是当它更新gui或者将其国际化的时候,你的继承者会讨厌你。 (相信我这个,我是从一开始就使用布局管理员的人,也是忽略我的那个人的继任者。)
I'm writing a GUI for an application using Swing, and in the interests of code maintenance and readability, I want to follow a consistent pattern throughout the whole system.
Most of the articles and books (or at least book sections) that I've read appear to provide plenty of examples on how to create and arrange various components, but ignore the bigger picture of writing a full GUI.
What are your best tips for application GUI design, and what patterns do you follow when designing or refactoring a GUI application?
解决方案Use layout managers. You might think it's simpler just to position everything with hard coded positions now (especially if you use a graphical layout tool), but when it comes time to update the gui, or internationalize it, your successors will hate you. (Trust me on this, I was the guy saying to use the layout managers from the start, and the successor to the guy who ignored me.)
更多推荐
你最好的Swing设计模式和提示是什么?
发布评论