Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.awt.event.*;
- import javax.swing.*; // this is used to access the JFrame,JButton, JLabel,JTextField, and the JTabbedPane class
- import java.awt.Dimension;
- import javax.swing.JFrame;
- import javax.swing.JPanel;
- import javax.swing.JScrollPane;
- import javax.swing.JTextArea;
- import javax.swing.SwingUtilities;
- import javax.swing.UIManager;
- import javax.swing.WindowConstants;
- import java.sql.*;
- public class main{
- static public JTabbedPane tabbedPane;
- public static void main(String args[])throws SQLException, ClassNotFoundException {
- // Load the JDBC driver
- //Class.forName("com.mysql.jdbc.Driver");
- //System.out.println("Driver loaded");
- // Establish a connection using "sampdb" as the DB created in MySql
- //Connection connection = DriverManager.getConnection
- //("jdbc:mysql://localhost/REAPSdb", "root","cs304");
- //System.out.println("Database connected");
- JFrame frame = new JFrame("Reaps DB");
- tabbedPane = new JTabbedPane();
- homePanel home = new homePanel();
- tabbedPane.add("Info",home);
- //tabbedPane.add("Update",home);
- frame.add(tabbedPane);
- frame.setSize(600,600);
- frame.setVisible(true);
- // close the connection
- //connection.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement