• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Using NullLayout for GUI development

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are there any restrictions by Sun in using
NullLayout as the layout for GUI development?
I'm really lazy and wanted to develop a
wizard dialog this way since it's not resizable
anyway.
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wouldn't suggest it. The purpose of the exam is to demonstrate some knowledge. It will appear as if you don't know how to use a layout.
 
Tarun Sukhani
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Man, why can't Sun let me be lazy and just plop components using an IDE? Client side programming sucks!

Originally posted by Gregory Garrison:
Wouldn't suggest it. The purpose of the exam is to demonstrate some knowledge. It will appear as if you don't know how to use a layout.

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having this problem. I did use layout managers on my main window, but I don't see why is it better to not use a null layout for a tiny, not resizable dialog.

Considering the cost/benefit, it looks better and it's less costly (I could almost use JOptionPane).

Did anyone use null layouts for anything here?
 
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
NEVER use NullLayout. It's inconsistent across platforms for one thing, and as said just shouts "I used an IDE because I couldn't be bothered to learn how to do it myself".

For dialog boxes, JOptionPane can be an excellent choice, if it can do what you need it to.
 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

Use the NullLayout in NetBeans and change it to GridBag. I think it's a good idea.
 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my assignment I've got the following requirement (see below) and I don't think using the NullLayout meets this requirement, plus it doesn't take a genius to notice code that has been generated which would be an instant failure.

Your user interface should be designed with the expectation of future functionality enhancements, and it should establish a framework that will support this with minimal disruption to the users when this occurs.



regards
Jason
 
Dalton Filho
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm now using GridBagHell for the search dialog... I hope they like it... :roll:
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I were you, I would avoid using GridBag. The code of the gridbag layout manager is the hardest to read and maintain. If you MUST use gridbag, make sure you understand and document all of the code otherwise you are likely to lose points here.

I'd recommend that you read up on FlowLayout, BorderLayout and BoxLayout. You can build just about anything by combining these layout managers.

Nick
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And GridLayout, which can be handy for grouping dialogs nicely with all the elements lined up in columns.
 
brevity is the soul of wit - shakepeare. Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic