This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

SetLayout to null for GUI is OK ??  RSS feed

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my design, when start the application, a dialog will prompt for user to select the connection type(local or remote). The dialog is fixed size, I want to setLayoutManagement to this dialog to null. Do U think it's not good and deducted some marks ?
Thx a lot.
 
author and jackaroo
Marshal Commander
Posts: 12218
279
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Alan, welcome to JavaRanch.
The reason for layout managers is that it provides an object oriented way of laying out components that works regardless of operating system.
The bad things about setting layout manager to null and manually placing each component are that:
  • Adding or moving a component becomes very labour intensive - if you add a row, all components under that row have to manually moved down a row.
  • The same screen displayed on different operating systems can look wrong: If you design using a screen with standard components that take up 12 pixels, and move to a screen with standard components that take up 16 pixels, then your components may overlap. Conversely, if you design on a screen with standard components that take up 16 pixels and move to a screen with standard components that take up 12 pixels, then your components may move too far apart.


  • My instructions mention that:

    Your user interface should be designed with the expectation of future functionality enhancements

    I think that the first point I mentioned above would fail to meet this requirement.
    A further requirement is:

    layout uses good/accepted Human/Computer Interaction (HCI) principals

    . This is worth 16% of the whole assignment! If the examiner starts your application on the wrong hardware (or even just notices that it might cause problems) you could loose significant points here.
    So, no - even though it is not specifically disallowed, I think there is too much risk of it costing you marks.
    Regards, Andrew
     
    Alan A Smith
    Greenhorn
    Posts: 21
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi Andrew,
    Thanks a lot, your comment is really helpful for me. I will redesign my application to using a Layout manager.

    Regards,
    Alan
     
    Ranch Hand
    Posts: 7729
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hello Alan, great to have you on the JavaRanch.
    But (there's always a but) you are going to have to change your name according to the naming policy. Thanks in advance
    -Barry
     
    Ranch Hand
    Posts: 867
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    hi Alan
    SetLayout to null for GUI is OK ??
    Yes, but you need to
    setBounds(int corrX,int corrY,int width,int height);
    which needed to set the dialog where to appear and the size of it.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!