Advertisement
Guest User

Untitled

a guest
May 2nd, 2017
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. import java.awt.*;
  2. import java.awt.event.*;
  3. import javax.swing.*; // this is used to access the JFrame,JButton, JLabel,JTextField, and the JTabbedPane class
  4. import java.awt.Dimension;
  5. import javax.swing.JFrame;
  6. import javax.swing.JPanel;
  7. import javax.swing.JScrollPane;
  8. import javax.swing.JTextArea;
  9. import javax.swing.SwingUtilities;
  10. import javax.swing.UIManager;
  11. import javax.swing.WindowConstants;
  12. import java.sql.*;
  13. public class main{
  14. static public JTabbedPane tabbedPane;
  15. public static void main(String args[])throws SQLException, ClassNotFoundException {
  16. // Load the JDBC driver
  17. //Class.forName("com.mysql.jdbc.Driver");
  18. //System.out.println("Driver loaded");
  19.  
  20. // Establish a connection using "sampdb" as the DB created in MySql
  21. //Connection connection = DriverManager.getConnection
  22. //("jdbc:mysql://localhost/REAPSdb", "root","cs304");
  23. //System.out.println("Database connected");
  24. JFrame frame = new JFrame("Reaps DB");
  25. tabbedPane = new JTabbedPane();
  26. homePanel home = new homePanel();
  27. tabbedPane.add("Info",home);
  28. //tabbedPane.add("Update",home);
  29.  
  30. frame.add(tabbedPane);
  31.  
  32. frame.setSize(600,600);
  33. frame.setVisible(true);
  34.  
  35. // close the connection
  36. //connection.close();
  37.  
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement