swing null layout


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: swing null layout

Hybrid View

  1. #1
    satish Guest

    swing null layout




    Hi,


    I am new to using Swing and I need to create a front-end for a project using
    swing. There are many buttons and other controls on the screen at different
    locations. I am using the JBuilder 5 IDE for putting the controls on the
    screen. I am finding it difficult to place all the controls on the wherever
    I want to.I could able to do it by creating too many panles ,setting their
    layouts etc...which I feel is a rediuos process..The main problem I find
    is using the layout managers, border or flow etc,,,which try to set the controls
    on their own without the developer's intervention. alternatively I created
    the same layout using JBuilder in 10 mins using the NULL Layout..which is
    very good and seems to be quiet simple. But then what is the advantage of
    using the tedious layout managers and why is it that we are not supposed
    to use the Null layout as told by my friend? I would be happy if anyone could
    take time to solve my doubts.

    Regards

    Satish

  2. #2
    markn Guest

    Re: swing null layout


    "Java is a cross-platform language and the GUI components may have different
    sizes depending on the platform.
    If an application may ever be converted to support different national languages
    (e.g., French, German), then it is important to have the labels and other
    components resize themselves to fit the length of the words.
    Even running on the same platform and the same national language, different
    screen resolutions may require automatic positioning. "

    No layout manager - no auto-resizing.

    Mark

    "satish" <satish_141@yahoo.com> wrote:
    >
    >
    >
    >Hi,
    >
    >
    > I am new to using Swing and I need to create a front-end for a project

    using
    >swing. There are many buttons and other controls on the screen at different
    >locations. I am using the JBuilder 5 IDE for putting the controls on the
    >screen. I am finding it difficult to place all the controls on the wherever
    >I want to.I could able to do it by creating too many panles ,setting their
    >layouts etc...which I feel is a rediuos process..The main problem I find
    >is using the layout managers, border or flow etc,,,which try to set the

    controls
    >on their own without the developer's intervention. alternatively I created
    >the same layout using JBuilder in 10 mins using the NULL Layout..which is
    >very good and seems to be quiet simple. But then what is the advantage of
    >using the tedious layout managers and why is it that we are not supposed
    >to use the Null layout as told by my friend? I would be happy if anyone

    could
    >take time to solve my doubts.
    >
    >Regards
    >
    >Satish



  3. #3
    satish Guest

    Re: swing null layout


    Hi Mark,

    Thanks for your response and also for a very good answer. Now I am conviced
    that I must use a layout manager, but could you please tell me which layout
    manager I should use inorder to create a screen with many controls at different
    locations?

    Regards

    Satish

  4. #4
    markn Guest

    Re: swing null layout


    Depends on the functionality you desire. We typically use Box and Border
    and that covers most functionality. You may need to use different combinations
    to get the desired effect.

    Mark

    "satish" <satish_141@yahoo.com> wrote:
    >
    >Hi Mark,
    >
    > Thanks for your response and also for a very good answer. Now I am conviced
    >that I must use a layout manager, but could you please tell me which layout
    >manager I should use inorder to create a screen with many controls at different
    >locations?
    >
    >Regards
    >
    >Satish



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center