Example usage for java.awt BorderLayout SOUTH

List of usage examples for java.awt BorderLayout SOUTH

Introduction

In this page you can find the example usage for java.awt BorderLayout SOUTH.

Prototype

String SOUTH

To view the source code for java.awt BorderLayout SOUTH.

Click Source Link

Document

The south layout constraint (bottom of container).

Usage

From source file:Main.java

public Main() {
    cbo.setRenderer(new CustomComboBox());
    add(cbo, BorderLayout.SOUTH);
    add(new JLabel("Hello"), BorderLayout.CENTER);

    setDefaultCloseOperation(EXIT_ON_CLOSE);
    pack();/*from   w w w . ja v  a  2  s  .com*/
    setVisible(true);
}

From source file:Main.java

public Main(String title) {
    super(title);
    north = new Button("North");
    south = new Button("South");
    east = new Button("East");
    west = new Button("West");
    center = new Button("Center");
    this.add(north, BorderLayout.NORTH);
    this.add(south, BorderLayout.SOUTH);
    this.add(east, BorderLayout.EAST);
    this.add(west, BorderLayout.WEST);
    this.add(center, BorderLayout.CENTER);
}

From source file:PngIcon.java

public PngIcon() {
    JFrame frame = new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JButton bt = new JButton(new ImageIcon("dtmail.png"));
    JLabel lab = new JLabel(new ImageIcon("dtterm.png"));
    bt.setFocusPainted(false);/*from   w  w w .j  av  a2 s.c o  m*/

    frame.add(bt, BorderLayout.NORTH);
    frame.add(lab, BorderLayout.SOUTH);
    frame.setBounds(50, 50, 200, 200);
    frame.setVisible(true);
}

From source file:Main.java

public Main() {
    box.setBackground(Color.RED);
    box.addFocusListener(getFocusListener());
    JTextField f = new JTextField();
    add(box, BorderLayout.SOUTH);
    add(f, BorderLayout.NORTH);/*from  w w  w . j  a v  a 2  s  .co  m*/
    pack();
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setVisible(true);
}

From source file:Main.java

public Main() {
    setLayout(new BorderLayout());

    JPanel east = new JPanel(new BorderLayout());
    add(east, BorderLayout.EAST);

    BasicArrowButton north = new BasicArrowButton(BasicArrowButton.NORTH);

    east.add(north, BorderLayout.NORTH);

    BasicArrowButton south = new BasicArrowButton(BasicArrowButton.SOUTH);
    east.add(south, BorderLayout.SOUTH);
}

From source file:BorderLayout1.java

public void init() {
    Container cp = getContentPane();
    cp.add(BorderLayout.NORTH, new JButton("North"));
    cp.add(BorderLayout.SOUTH, new JButton("South"));
    cp.add(BorderLayout.EAST, new JButton("East"));
    cp.add(BorderLayout.WEST, new JButton("West"));
    cp.add(BorderLayout.CENTER, new JButton("Center"));
}

From source file:Main.java

public Main() {
    setSize(450, 350);

    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    getContentPane().add(new PasswordPanel(), BorderLayout.SOUTH);
}

From source file:Main.java

public Main() {
    setPreferredSize(new Dimension(640, 480));
    getContentPane().setLayout(new BorderLayout());
    testButton = new JButton("Click me");
    testButton.addActionListener(this);
    getContentPane().add(testButton, BorderLayout.SOUTH);
    pack();/* www.j ava  2  s  . com*/
}

From source file:Main.java

public Main() {
    start2.addActionListener(e -> dialog.setVisible(false));
    dialog.add(start2, BorderLayout.SOUTH);
    dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
    dialog.setUndecorated(true);/*from   w w  w  .  ja  v a2s.co  m*/
    dialog.setVisible(false);
    start1.addActionListener(e -> {
        dim = frame.getSize();
        pnt = frame.getLocationOnScreen();
        int x = dim.width - 8;
        int y = dim.height - 8;
        dialog.setSize(x, y);
        x = pnt.x + 4;
        y = pnt.y + 4;
        dialog.setLocation(x, y);
        visibleForJDialog();
    });
    frame.add(start1, BorderLayout.SOUTH);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setLocation(150, 150);
    frame.setSize(300, 300);
    frame.setVisible(true);
}

From source file:Main.java

Main() {
    comboBox = new JComboBox<>(new String[] { "111", "222", "333" });
    JList<String> list = new JList<>(model = new DefaultListModel<>());
    add(comboBox, BorderLayout.SOUTH);
    add(new JScrollPane(list));

    addKeyBindings((JComponent) getContentPane());
    addKeyBindings(comboBox);/*from w w  w  .  j  a v a  2  s .  co  m*/

    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    pack();
    setVisible(true);
}