Java Panels

Discussion in 'OT Technology' started by [DWI], Sep 13, 2003.

  1. [DWI]

    [DWI] Master of Nothing

    Joined:
    Aug 6, 2000
    Messages:
    21,936
    Likes Received:
    0
    Location:
    Maine
    I need to set up a simple 2 panel window (left side and right side) what would the code to set this up look like? (the left side will have a couple buttons and such in it) thanks.
     
  2. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
    I take it you're asking about aligning everything correctly and you know how to create JPanels. When people ask me about placing controls in Java Swing, I always suggest setting the bounds in an absolute fashion. It just works out better that way.

    Code:
    JPanel panel1 = new JPanel();
    panel1.setBounds(10, 20, 420, 170);
    
     
  3. [DWI]

    [DWI] Master of Nothing

    Joined:
    Aug 6, 2000
    Messages:
    21,936
    Likes Received:
    0
    Location:
    Maine
    thank you very much
     
  4. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA

Share This Page