// TODO add your handling code here:
//            JTextField id = new JTextField();
private void addAlbumActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addAlbumActionPerformed
        // TODO add your handling code here:
        try {
            // TODO add your handling code here:
            try {
                Class.forName("oracle.jdbc.driver.OracleDriver");
            } catch (ClassNotFoundException ex) {
                Logger.getLogger(AdminView.class.getName()).log(Level.SEVERE, null, ex);
            }
            // TODO add your handling code here:
//            JTextField id = new JTextField();
            JTextField name = new JTextField();
            Object[] input = {
//                "Id : ", id,
                "Name : ", name,
            };
            int option = JOptionPane.showConfirmDialog(this, input, "Enter Album details", JOptionPane.OK_CANCEL_OPTION);
            if(option == JOptionPane.OK_OPTION) {
                 try{  
                    Class.forName("oracle.jdbc.driver.OracleDriver");  
                    Connection con = DriverManager.getConnection(
                             "jdbc:oracle:thin:@localhost:1521:newdatabase","system","not12345");
                    CallableStatement ps = con.prepareCall ("{call addalbum(?, ?)}");
                    ps.setString(1, null);  
                    ps.setString(2, name.getText());
                    ps.executeUpdate();
                    ps.close();
                    con.close();  
                } catch (Exception e) {e.printStackTrace();}  
                JOptionPane.showMessageDialog(this, "Success!\n");
            }
        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, "Error!\n"+e.getMessage());
        }
    }
private void addAlbumActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addAlbumActionPerformed
// TODO add your handling code here:
try {
// TODO add your handling code here:
try {
private void addAlbumActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addAlbumActionPerformed
// TODO add your handling code here:
try {
// TODO add your handling code here:
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
} catch (ClassNotFoundException ex) {
Logger.getLogger(AdminView.class.getName()).log(Level.SEVERE, null, ex);
}
// TODO add your handling code here:
// JTextField id = new JTextField();
JTextField name = new JTextField();
Object[] input = {
private void addAlbumActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addAlbumActionPerformed
// TODO add your handling code here:
try {
// TODO add your handling code here:
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
} catch (ClassNotFoundException ex) {
Logger.getLogger(AdminView.class.getName()).log(Level.SEVERE, null, ex);
}
// TODO add your handling code here:
// JTextField id = new JTextField();
JTextField name = new JTextField();
Object[] input = {
// "Id : ", id,
"Name : ", name,
};
int option = JOptionPane.showConfirmDialog(this, input, "Enter Album details", JOptionPane.OK_CANCEL_OPTION);
if(option == JOptionPane.OK_OPTION) {
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection(
"jdbc:oracle:thin:@localhost:1521:newdatabase","system","not12345");
CallableStatement ps = con.prepareCall ("{call addalbum(?, ?)}");