Command : CONVERTPSTYLES to convert CTB to STB
How to align view port
1-Copy the view port border in the model space and scale it to hold the drawing and use align (express-layout tool align space). This will allow you first to select in the model space and second in the layout space points to align.
Remember this can easily can be done playing with UCS.
Remember this can easily can be done playing with UCS.
cmd_loginActionPerformed
String sql = "select * from users where first_name=? and password=?";
// String sql="select * from Modules where username=? and password=?";
try {
pst = conn.prepareStatement(sql);
pst.setString(1, txt_username.getText());
pst.setString(2, txt_password.getText());
rs= pst.executeQuery();
if (rs.next()) {
JOptionPane.showMessageDialog(null, "Username and Password are correct");
Main s=new Main();
s.setVisible(true);
}else{
JOptionPane.showMessageDialog(null, "Username and Password are not correct");
}
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e.getMessage());
}
in the main class
Connection conn = null;
ResultSet rs = null;
PreparedStatement pst = null;
/** Creates new form Login */
public Login() {
initComponents();
conn = javaconnect.ConnecrDB();
}
// String sql="select * from Modules where username=? and password=?";
try {
pst = conn.prepareStatement(sql);
pst.setString(1, txt_username.getText());
pst.setString(2, txt_password.getText());
rs= pst.executeQuery();
if (rs.next()) {
JOptionPane.showMessageDialog(null, "Username and Password are correct");
Main s=new Main();
s.setVisible(true);
}else{
JOptionPane.showMessageDialog(null, "Username and Password are not correct");
}
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e.getMessage());
}
in the main class
Connection conn = null;
ResultSet rs = null;
PreparedStatement pst = null;
/** Creates new form Login */
public Login() {
initComponents();
conn = javaconnect.ConnecrDB();
}
Update Table
private void update_table() {
try {
String sql = "select * from Employeeinfo";
pst = conn.prepareStatement(sql);
rs = pst.executeQuery();
tbl_employee.setModel(DbUtils.resultSetToTableModel(rs));
} catch (SQLException ex) {
Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
}
}
for DbUtils.resultSetToTableModel(rs) need to add jar file of rs2xml.jar
and then
Connection conn = null;
ResultSet rs = null;
PreparedStatement pst = null;
/**
* Creates new form NewJFrame
*/
public NewJFrame() {
initComponents();
conn = javaconnect.ConnecrDB(); update_table(); }
try {
String sql = "select * from Employeeinfo";
pst = conn.prepareStatement(sql);
rs = pst.executeQuery();
tbl_employee.setModel(DbUtils.resultSetToTableModel(rs));
} catch (SQLException ex) {
Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
}
}
for DbUtils.resultSetToTableModel(rs) need to add jar file of rs2xml.jar
and then
Connection conn = null;
ResultSet rs = null;
PreparedStatement pst = null;
/**
* Creates new form NewJFrame
*/
public NewJFrame() {
initComponents();
conn = javaconnect.ConnecrDB(); update_table(); }
Subscribe to:
Posts (Atom)