Advertisement
Guest User

Untitled

a guest
Jun 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. package guibd;
  2.  
  3. import java.awt.Container;
  4. import java.sql.Connection;
  5. import java.sql.Statement;
  6. import javax.swing.JFrame;
  7. import javax.swing.JLabel;
  8. import javax.swing.SpringLayout;
  9.  
  10. class Conexao {
  11. public Conexao() {
  12. String nomeJDBC = "jdbc:mysql://localhost/discdb";
  13. String nomeUser = "root";
  14. String password = "";
  15. Statement statement = null;
  16. Connection connection = null;
  17. String nome = "RECORDS";
  18.  
  19. try {
  20. Class.forName("com.mysql.jdbc.Driver");
  21. }
  22. }
  23. }
  24.  
  25. public class Frame extends JFrame{
  26.  
  27. private JLabel jtextCodDisco;
  28. private JLabel jtextTitulo;
  29. private JLabel jtextGenero;
  30. private JLabel jtextCodArt;
  31. private JLabel jtextCodGrav;
  32.  
  33. public Frame() {
  34.  
  35. super("DAO+GUI");
  36.  
  37. jtextCodDisco = new JLabel("Código Disco");
  38. add(jtextCodDisco);
  39.  
  40. add(new JLabel(" | "));
  41.  
  42. }
  43.  
  44. public static void main(String[] args) {
  45.  
  46. Frame frame = new Frame();
  47. Container container = frame.getContentPane();
  48. SpringLayout layout = new SpringLayout();
  49.  
  50. container.setLayout(layout);
  51.  
  52. frame.pack();
  53.  
  54. frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
  55. frame.setSize(480, 150);
  56. frame.setVisible(true);
  57.  
  58. }
  59.  
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement