try {
con = DriverManager.getConnection("jdbc:odbc:dsn", "system", "hr");
cs=con.prepareCall("{call newteacherid(?,?,?)}");
cs.setString(1,teacherid.getText());
cs.setString(2,teacherid.getText());
cs.setInt(3,1);
cs.execute();
System.out.println("dfasfgasrg");
}
catch (SQLException ex) {
JOptionPane.showMessageDialog(null,"Invalid teacher ID","Error",JOptionPane.ERROR_MESSAGE );
Logger.getLogger(Administrator.class.getName()).log(Level.SEVERE, null, ex);
}
import java.awt.*;
class ScreenRes {
public static void main(String args[]) {
new ScreenRes().doit();
}
public void doit() {
Frame frame = new Frame();
GraphicsDevice device;
device =
GraphicsEnvironment.
getLocalGraphicsEnvironment().
getDefaultScreenDevice();
if ( device.isFullScreenSupported() ) {
device.setFullScreenWindow(frame);
if (device.isDisplayChangeSupported()) {
device.setDisplayMode(
new DisplayMode( 0,0,
8, // bitDepth - 8 bits 256 colors
DisplayMode.REFRESH_RATE_UNKNOWN ));
}
else {
System.err.println("Change display mode not supported");
}
}
else {
System.err.println("Full screen not supported");
}
}
}