Title: javax.swing Class JPasswordField
1javax.swing Class JPasswordField
2- public class JPasswordField
- extends JTextField
- JPasswordField is a lightweight component that
allows the editing of a single line of text where
the view indicates something was typed, but does
not show the original characters.
3- char getPassword()
- Returns the text contained in this TextComponent.
private JPasswordField jPasswordField1 new
JPasswordField() jPasswordField1.setBounds(new
Rectangle(145, 120, 160, 25)) ...................
.......... String bnew String(jPasswordField1.ge
tPassword()) System.out.println(b)
4Login Frame
JFrame frame new Frame1(username,password)
public Frame1(String a, String b)
usernamea passwordb try
jbInit() catch (Exception e)
e.printStackTrace()
5java.sql
6prepareStatementPreparedStatement
prepareStatement(String sql) throws
SQLException
- Creates a PreparedStatement object for sending
parameterized SQL statements to the database. A
SQL statement with or without IN parameters can
be pre-compiled and stored in a PreparedStatement
object. This object can then be used to
efficiently execute this statement multiple
times. - Note This method is optimized for handling
parametric SQL statements that benefit from
precompilation. If the driver supports
precompilation, the method prepareStatement will
send the statement to the database for
precompilation. Some drivers may not support
precompilation. In this case, the statement may
not be sent to the database until the
PreparedStatement object is executed. This has no
direct effect on users however, it does affect
which methods throw certain SQLException objects.
- Result sets created using the returned
PreparedStatement object will by default be type
TYPE_FORWARD_ONLY
7(No Transcript)
8(No Transcript)
9(No Transcript)