javax.swing Class JPasswordField - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

javax.swing Class JPasswordField

Description:

javax.swing. Class JPasswordField. public class JPasswordField. extends JTextField ... Result sets created using the returned PreparedStatement object will by default ... – PowerPoint PPT presentation

Number of Views:83
Avg rating:3.0/5.0
Slides: 10
Provided by: ERI7205
Category:

less

Transcript and Presenter's Notes

Title: javax.swing Class JPasswordField


1
javax.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)
4
Login Frame
JFrame frame new Frame1(username,password)
public Frame1(String a, String b)
usernamea passwordb try
jbInit() catch (Exception e)
e.printStackTrace()
5
java.sql
  • prepareStatement

6
prepareStatementPreparedStatement
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)
Write a Comment
User Comments (0)
About PowerShow.com