GUI Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kid Programmer
    New Member
    • Mar 2008
    • 176

    GUI Question

    Hello guys. I have a GUI question. How do you format your page with buttons and things so that, for example, you would have something looking like this:
    Code:
       
                                                                button1
                           button2
                                                                                                    button3
    How would you do this?
  • sukatoa
    Contributor
    • Nov 2007
    • 539

    #2
    Are you talking about Frames?

    If yes, you can set the container's layout into null, then use setBounds/setLocation method for that.....

    Comment

    • Kid Programmer
      New Member
      • Mar 2008
      • 176

      #3
      Originally posted by sukatoa
      Are you talking about Frames?

      If yes, you can set the container's layout into null, then use setBounds/setLocation method for that.....
      Yes I am talking about frames.

      Comment

      • BigDaddyLH
        Recognized Expert Top Contributor
        • Dec 2007
        • 1216

        #4
        Originally posted by sukatoa
        Are you talking about Frames?

        If yes, you can set the container's layout into null, then use setBounds/setLocation method for that.....
        I'm really loath to give up on the LayoutManager, and so far I've never given up and set layout to null.

        One option is to have a GridLayout with blank labels for the empty cells:

        B__
        __B
        _B_

        If you want bigger gaps, use a GridBagLayout or SpringLayout.

        Comment

        • JosAH
          Recognized Expert MVP
          • Mar 2007
          • 11453

          #5
          Originally posted by BigDaddyLH
          I'm really loath to give up on the LayoutManager, and so far I've never given up and set layout to null.

          One option is to have a GridLayout with blank labels for the empty cells:

          B__
          __B
          _B_

          If you want bigger gaps, use a GridBagLayout or SpringLayout.
          ps Box.createHoriz ontalGlue() would be fine too.

          kind regards,

          Jos

          Comment

          • Kid Programmer
            New Member
            • Mar 2008
            • 176

            #6
            Originally posted by JosAH
            ps Box.createHoriz ontalGlue() would be fine too.

            kind regards,

            Jos
            I also want to be able to place the buttons on different lines.

            Comment

            • JosAH
              Recognized Expert MVP
              • Mar 2007
              • 11453

              #7
              Originally posted by Kid Programmer
              I also want to be able to place the buttons on different lines.
              Sure, do as BDLH suggested and put them in a GridLayout; for the 'empty' cells
              you can use empty labels as BDLH suggested or Glue as I suggested.

              kind regards,

              Jos

              Comment

              Working...