Advertisement
fabioceep

JAVA: Gerenciador de Layout (PG286)

Feb 22nd, 2020
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. package gerenciadoreslayout;
  2. import javax.swing.*;
  3. import java.awt.*;
  4.  
  5. public class GerenciadoresLayout {
  6.     public static void main(String[] args) {
  7.         GerenciadoresLayout sistema = new GerenciadoresLayout();
  8.         sistema.iniciar();
  9.     }
  10.     public void iniciar() {
  11.         JFrame janela = new JFrame();
  12.         JButton botao = new JButton("Click aqui");
  13.         janela.getContentPane().add(BorderLayout.EAST, botao);
  14.         janela.setSize(200,200);
  15.         janela.setVisible(true);
  16.     }
  17.    
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement