Need help with pail (where to place items)

Discussion in 'Plugin Development' started by Hello Minecraft World, Feb 12, 2012.

Thread Status:
Not open for further replies.
  1. I hooked my plugin into pail and before i did that i testet a single class to see how to do it.
    small code i used:
    Code:
    addElement(contentPanel, jLabel1,0,0,100,20);
    jTextField1 = new JTextField();
    addElement(contentPanel, jTextField1,0,20,100,20);
    jButton1 = new JButton("Click Me");
    addElement(contentPanel, jButton1,0,100,100,20);
    worked and the items where lined up but in the pail tab using:
    Code:
    addElement(panel, jLabel1,0,0,100,20);
            jLabel2 = new JLabel("Set the Motd");
            addElement(panel, jLabel2,0,30,100,20);
            jTextField1 = new JTextField();
            addElement(panel, jTextField1,0,50,100,20);
            jButton1 = new JButton("Save");
            addElement(panel, jButton1,0,75,100,20);
    they got centered and on one single line.
    Anyone know how to fix and get them on a seperat line?

    Screenshot: What i want:
    [​IMG]
    What i get:
    [​IMG]

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 23, 2016
  2. Found out...
    just needed:
    panel.setLayout(null);
     
Thread Status:
Not open for further replies.

Share This Page