Advertisement
Guest User

Untitled

a guest
Nov 17th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5.38 KB | None | 0 0
  1.  
  2. import java.awt.EventQueue;
  3.  
  4. import javax.swing.JFrame;
  5. import javax.swing.JPanel;
  6. import javax.swing.border.SoftBevelBorder;
  7.  
  8.  
  9. import javax.swing.border.BevelBorder;
  10. import javax.swing.JTextPane;
  11. import java.awt.Color;
  12. import javax.swing.JLabel;
  13. import java.awt.Font;
  14. import javax.swing.JTextField;
  15. import javax.swing.JProgressBar;
  16. import javax.swing.JButton;
  17. import javax.swing.AbstractAction;
  18. import java.awt.event.ActionEvent;
  19. import java.io.File;
  20. import javax.swing.Action;
  21. import javax.swing.JFileChooser;
  22. import java.awt.event.ActionListener;
  23. import javax.swing.JTable;
  24. import javax.swing.JScrollPane;
  25. public class GDI extends JFrame {
  26.  
  27.     /**
  28.      *
  29.      */
  30.     private static final long serialVersionUID = 1L;
  31.     private JPanel contentPane;
  32.     private final Action botaoReber = new SwingAction();
  33.     private final Action botaoEnviar = new SwingAction_1();
  34.     JFileChooser chooser;
  35.     private File file;
  36.     private JFileChooser chooserDown;
  37.     private JTable table;
  38.     private JTextField codigoFilme;
  39.     private JTextField tituloFilme;
  40.     private JTextField anoFilme;
  41.     private JTextField generoFilme;
  42.     private JTextField codigoRoteiro;
  43.     private JTextField classificacaoFilme;
  44.     private JTextField notaFilme;
  45.     private JTextField orcamentoFilme;
  46.     /**
  47.      * Launch the application.
  48.      */
  49.     public static void main(String[] args) {
  50.         EventQueue.invokeLater(new Runnable() {
  51.             public void run() {
  52.                 try {
  53.                     GDI frame = new GDI();
  54.                     frame.setVisible(true);
  55.                 } catch (Exception e) {
  56.                     e.printStackTrace();
  57.                 }
  58.             }
  59.         });
  60.     }
  61.  
  62.     /**
  63.      * Create the frame.
  64.      */
  65.     public GDI() {
  66.         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  67.         setBounds(100, 100, 1090, 606);
  68.         contentPane = new JPanel();
  69.         contentPane.setBackground(Color.LIGHT_GRAY);
  70.         contentPane.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
  71.         setContentPane(contentPane);
  72.         contentPane.setLayout(null);
  73.         table = new JTable();
  74.         table.setBackground(Color.ORANGE);
  75.         table.setBounds(599, 548, -533, -478);
  76.         contentPane.add(table);
  77.        
  78.         codigoFilme = new JTextField();
  79.         codigoFilme.setBounds(635, 121, 168, 20);
  80.         contentPane.add(codigoFilme);
  81.         codigoFilme.setColumns(10);
  82.        
  83.         JLabel lblCodigoDoFilme = new JLabel("Codigo do filme:");
  84.         lblCodigoDoFilme.setBounds(635, 96, 89, 14);
  85.         contentPane.add(lblCodigoDoFilme);
  86.        
  87.         JLabel lblTtuloDoFilme = new JLabel("T\u00EDtulo do filme:");
  88.         lblTtuloDoFilme.setBounds(635, 152, 89, 14);
  89.         contentPane.add(lblTtuloDoFilme);
  90.        
  91.         tituloFilme = new JTextField();
  92.         tituloFilme.setColumns(10);
  93.         tituloFilme.setBounds(635, 177, 168, 20);
  94.         contentPane.add(tituloFilme);
  95.        
  96.         JLabel lblAnoDeProduo = new JLabel("Ano de produ\u00E7\u00E3o:");
  97.         lblAnoDeProduo.setBounds(635, 208, 89, 14);
  98.         contentPane.add(lblAnoDeProduo);
  99.        
  100.         anoFilme = new JTextField();
  101.         anoFilme.setColumns(10);
  102.         anoFilme.setBounds(635, 233, 168, 20);
  103.         contentPane.add(anoFilme);
  104.        
  105.         JLabel lblGnero = new JLabel("G\u00EAnero:");
  106.         lblGnero.setBounds(635, 264, 89, 14);
  107.         contentPane.add(lblGnero);
  108.        
  109.         generoFilme = new JTextField();
  110.         generoFilme.setColumns(10);
  111.         generoFilme.setBounds(635, 289, 168, 20);
  112.         contentPane.add(generoFilme);
  113.        
  114.         JLabel lblCdigoRoteiro = new JLabel("C\u00F3digo Roteiro");
  115.         lblCdigoRoteiro.setBounds(841, 264, 89, 14);
  116.         contentPane.add(lblCdigoRoteiro);
  117.        
  118.         codigoRoteiro = new JTextField();
  119.         codigoRoteiro.setColumns(10);
  120.         codigoRoteiro.setBounds(841, 289, 168, 20);
  121.         contentPane.add(codigoRoteiro);
  122.        
  123.         JLabel lblClassificaoIndicativa = new JLabel("Classifica\u00E7\u00E3o indicativa:");
  124.         lblClassificaoIndicativa.setBounds(841, 96, 134, 14);
  125.         contentPane.add(lblClassificaoIndicativa);
  126.        
  127.         classificacaoFilme = new JTextField();
  128.         classificacaoFilme.setColumns(10);
  129.         classificacaoFilme.setBounds(841, 121, 168, 20);
  130.         contentPane.add(classificacaoFilme);
  131.        
  132.         JLabel lblNotaCrtica = new JLabel("Nota Cr\u00EDtica:");
  133.         lblNotaCrtica.setBounds(841, 152, 89, 14);
  134.         contentPane.add(lblNotaCrtica);
  135.        
  136.         notaFilme = new JTextField();
  137.         notaFilme.setColumns(10);
  138.         notaFilme.setBounds(841, 177, 168, 20);
  139.         contentPane.add(notaFilme);
  140.        
  141.         JLabel lblOramento = new JLabel("Or\u00E7amento:");
  142.         lblOramento.setBounds(841, 208, 89, 14);
  143.         contentPane.add(lblOramento);
  144.        
  145.         orcamentoFilme = new JTextField();
  146.         orcamentoFilme.setColumns(10);
  147.         orcamentoFilme.setBounds(841, 233, 168, 20);
  148.         contentPane.add(orcamentoFilme);
  149.        
  150.         JButton btnInserir = new JButton("Inserir");
  151.         btnInserir.setBounds(635, 347, 374, 54);
  152.         contentPane.add(btnInserir);
  153.        
  154.         JLabel lblFilmeGdi = new JLabel("Filme GDI:");
  155.         lblFilmeGdi.setBounds(20, 11, 78, 14);
  156.         contentPane.add(lblFilmeGdi);
  157.        
  158.         JLabel lblNewLabel = new JLabel("");
  159.         lblNewLabel.setBounds(646, 430, 363, 127);
  160.         contentPane.add(lblNewLabel);
  161.  
  162.     }
  163.  
  164.     private class SwingAction extends AbstractAction {
  165.         /**
  166.          *
  167.          */
  168.         private static final long serialVersionUID = 1L;
  169.         public SwingAction() {
  170.             putValue(NAME, "Receber");
  171.             putValue(SHORT_DESCRIPTION, "Some short description");
  172.         }
  173.         public void actionPerformed(ActionEvent e) {
  174.  
  175.         }
  176.     }
  177.     private class SwingAction_1 extends AbstractAction {
  178.         /**
  179.          *
  180.          */
  181.         private static final long serialVersionUID = 1L;
  182.         public SwingAction_1() {
  183.             putValue(NAME, "Enviar");
  184.             putValue(SHORT_DESCRIPTION, "Some short description");
  185.         }
  186.         public void actionPerformed(ActionEvent e) {
  187.  
  188.         }
  189.     }
  190. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement