Help!!!! User Login page with java

Reply

Join Date: Feb 2009
Posts: 7
Reputation: snail_snail21 is an unknown quantity at this point 
Solved Threads: 0
snail_snail21 snail_snail21 is offline Offline
Newbie Poster

Help!!!! User Login page with java

 
0
  #1
Feb 5th, 2009
I want to create User Login page, but i have no idea about this, any idea for me? because just start to learn java, but i need create Login page....
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 16
Reputation: danielernesto is an unknown quantity at this point 
Solved Threads: 1
danielernesto danielernesto is offline Offline
Newbie Poster

Re: Help!!!! User Login page with java

 
0
  #2
Feb 5th, 2009
Using a desktop application or a web application??
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 7
Reputation: snail_snail21 is an unknown quantity at this point 
Solved Threads: 0
snail_snail21 snail_snail21 is offline Offline
Newbie Poster

Re: Help!!!! User Login page with java

 
0
  #3
Feb 6th, 2009
I just wan create for a system login, just for admin to login the system.no need web application.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 706
Reputation: stultuske is a jewel in the rough stultuske is a jewel in the rough stultuske is a jewel in the rough 
Solved Threads: 84
stultuske's Avatar
stultuske stultuske is offline Offline
Master Poster

Re: Help!!!! User Login page with java

 
0
  #4
Feb 6th, 2009
have you worked with Swing before?

create a DBConnection (since I think you'll want your passwords and usernames to be stored in a DB) and write a frame with contains two input fields.

what have you got this far?
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1,176
Reputation: stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light 
Solved Threads: 125
Featured Poster
stephen84s's Avatar
stephen84s stephen84s is offline Offline
Veteran Poster

Re: Help!!!! User Login page with java

 
0
  #5
Feb 6th, 2009
Check out this tutorial on swing in case you want to get your GUI up and running and then you might want do some validations on the username and password either in the database (then you might want to look here for jdbc) or want to use Files instead.
Last edited by stephen84s; Feb 6th, 2009 at 5:10 am.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."

"How to ask questions the smart way ?"
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 7
Reputation: snail_snail21 is an unknown quantity at this point 
Solved Threads: 0
snail_snail21 snail_snail21 is offline Offline
Newbie Poster

Re: Help!!!! User Login page with java

 
0
  #6
Feb 6th, 2009
i just design the login interface. The problem i face is i don't know how to continue after design.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1,176
Reputation: stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light 
Solved Threads: 125
Featured Poster
stephen84s's Avatar
stephen84s stephen84s is offline Offline
Veteran Poster

Re: Help!!!! User Login page with java

 
0
  #7
Feb 6th, 2009
Now the next logical step would be you want to validate the user.
What you could do is store a username and a password in either a File or a table in a database for ex: MS Access (or Apache Derby which ships with the JDK I assume.)

And whenever anyone clicks on say the "Login" or "Submit" button you would have to first validate whether the user has actually entered a value in the Password and UserName fields (if not you could show him an error message using the dialog boxes of JOptionPane) but if a proper value is found in both the fields you validate the user against the values (for username and password) present in the File or the database.
If the username and password combination specified in the form fields matches what you have in the File (or a the database table), you could display a success message (using JOptionPane once again) and stop there itself or take him a new form where you might want to do some more processing.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."

"How to ask questions the smart way ?"
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 7
Reputation: snail_snail21 is an unknown quantity at this point 
Solved Threads: 0
snail_snail21 snail_snail21 is offline Offline
Newbie Poster

Re: Help!!!! User Login page with java

 
0
  #8
Feb 7th, 2009
ok, i will try it. Thanks for giving advise.....actually i need to implement a motor plate recognition system by using java language.Anyone have any idea? I just got 2 more months to develop this system.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 7
Reputation: snail_snail21 is an unknown quantity at this point 
Solved Threads: 0
snail_snail21 snail_snail21 is offline Offline
Newbie Poster

Re: Help!!!! User Login page with java

 
0
  #9
Feb 9th, 2009
how to load an image into the frame? Because i'm implementing a MOTOR PLATE RECOGNITION SYSTEM.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 7
Reputation: snail_snail21 is an unknown quantity at this point 
Solved Threads: 0
snail_snail21 snail_snail21 is offline Offline
Newbie Poster

Re: Help!!!! User Login page with java

 
0
  #10
Feb 9th, 2009
public class FrameMain extends javax.swing.JFrame {
private CarSnapshot car;

public class RecognizeThread extends Thread {
FrameMain pFrame = null;

public RecognizeThread(FrameMain pFrame) {
this.pFrame = pFrame;
}
public void run() {
String recognizedText = "";
this.pFrame.recognitionLabel.setText("processing ...");
int index = this.pFrame.chooseIndex;
try {
/// recognizedText = Main.systemLogic.recognize(this.pFrame.car);
} catch (Exception ex) {
this.pFrame.recognitionLabel.setText("");
return;
}
this.pFrame.recognitionLabel.setText(recognizedText);
this.pFrame.fileListModel.fileList.elementAt(index).plateRecognition = recognizedText;
}
}
public class LoadImageThread extends Thread {
FrameMain pFrame = null;
String url = null;
public LoadImageThread(FrameMain pFrame, String url) {
this.pFrame = pFrame;
this.url = url;
}
public void run() {
try {
this.pFrame.car = new CarSnapshot(url);
this.pFrame.panelCarContent = this.pFrame.car.duplicate().getBi();
this.pFrame.panelCarContent = Photo.linearResizeBi(this.pFrame.panelCarContent,
this.pFrame.panelCar.getWidth(),
this.pFrame.panelCar.getHeight());
this.pFrame.panelCar.paint(this.pFrame.panelCar.getGraphics());
} catch (IOException ex) {
ex.printStackTrace();
}
}
}

///CarSnapshot car;

BufferedImage panelCarContent;
JFileChooser fileChooser;
private FileListModel fileListModel;
int chooseIndex = -1;
/** Creates new form FrameMain */
public FrameMain() {
initComponents();
// init : file chooser
this.fileChooser = new JFileChooser();
this.fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
/////this.fileChooser.setFileFilter(new ImageFileFilter());


// init : window dimensions and visibility
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
int width = this.getWidth();
int height = this.getHeight();
this.setLocation((screenSize.width - width)/2,(screenSize.height - height)/2);
this.setVisible(true);
}
private void fileListValueChanged(javax.swing.event.ListSelectionEvent evt) {
int selectedNow = this.fileList.getSelectedIndex();

if (selectedNow != -1 && this.chooseIndex != selectedNow) {
this.recognitionLabel.setText(this.fileListModel.fileList.elementAt(selectedNow).plateRecognition);
this.chooseIndex = selectedNow;
// proceed selectedNow
String path = ((FileListModel.FileListModelEntry)this.fileListModel.getElementAt(selectedNow)).fullPath;
//this.showImage(path);
/// new LoadImageThread(this,path).start();
}
}

private void recognizeActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
/// String plate = null;

// namiesto tohto urobime thread plate = Main.systemLogic.recognize(this.car);
// thread code start
/// new RecognizeThread(this).start();
}

private void loadImageActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int returnValue;
String fileURL;

this.fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
this.fileChooser.setDialogTitle("Load Image");
returnValue = this.fileChooser.showOpenDialog((Component)evt.getSource());

if (returnValue != this.fileChooser.APPROVE_OPTION) return;

fileURL = this.fileChooser.getSelectedFile().getAbsolutePath();
File selectedFile = new File(fileURL);

this.fileListModel = new FileListModel();
for (String nameOfFile : selectedFile.list()) {
///// if (!ImageFileFilter.accept(nameOfFile)) continue; // not a image
this.fileListModel.addFileListModelEntry(nameOfFile, selectedFile+File.separator+nameOfFile);
}
this.fileList.setModel(fileListModel);
}

private void exitMouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
System.exit(0);
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new FrameMain().setVisible(true);
}
});
}

// Variables declaration - do not modify
private javax.swing.JMenu exit;
private javax.swing.JMenu file;
private javax.swing.JList fileList;
private javax.swing.JScrollPane fileListScrollPane;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenuItem loadImage;
private javax.swing.JPanel panelCar;
private javax.swing.JLabel recognitionLabel;
private javax.swing.JButton recognize;
// End of variables declaration

}
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC