Nairaland ForumWelcome, Guest: Join Nairaland / Login / Trending / Recent / NewStats: 1060992 members, 1230964 topics. Date: Monday, 20 May 2013 at 12:54 AM |
Nairaland Forum / Science/Technology / Programming / Java_desktop_application (1010 Views)
| Java_desktop_application by a.r.okans(m): 12:59am On Dec 24, 2012 |
I am working on a project (desktop-based application) on building a platform where students and lecturers can interact concerning the school projects being carried out by the students. I have just read a good part of Java SE and want to implement skills through tactile means. I have done a bit in designing interfaces, abstraction and modelling as well as creating classes to accommodate the Student, Staff , these two extending a generic User class. I am presently reading databases in order to be able to store information about the student, staff as well as the projects. I need people with experience in this aspect to help so that i can move faster and complete this project within the timeline I have. Thanks in advance. |
| Re: Java_desktop_application by xterra2(m): 6:43pm On Dec 24, 2012 |
Next time, Ask the particular area you need help with. & please keep this thread updates, i sort of like this idea What area do you need help exactly? |
| Re: Java_desktop_application by naija_swag: 8:51am On Dec 25, 2012 |
You want to create a chat engine, you gonna deal with networking a bit, I did one that has a blackboard for someone's project. |
| Re: Java_desktop_application by stanliwise(m): 11:52am On Dec 26, 2012 |
you need to learn how to use java to interact with mysql. to be able to gather information pls try search foe dat |
| Re: Java_desktop_application by danvery2k6(m): 11:18pm On Dec 26, 2012 |
If you need immeadiate knowledge of MySQL, you can use the help documentation that comes with MySQL. 24 hrs should get you started |
| Re: Java_desktop_application by a.r.okans(m): 2:45pm On Dec 27, 2012 |
Thanks guys. I am getting a lot of help watching youtube videos. Thank you for your positive response. I will keep you posted on my progress. |
| Re: Java_desktop_application by LordRahl001: 10:53pm On Dec 30, 2012 |
Instead of mysql, u can use access as ur database without worrying your client with database installations. For a project like ds, access won't b a bad idea |
| Re: Java_desktop_application by a.r.okans(m): 3:47pm On Jan 08 |
a.r.okans: Guys, I have been able to design User interfaces and the issue with the db is solved now and I still ended up using mysql. Thank you for your invaluable contributions. Really, the issue now is getting to login. I have written methods to handle that which is successfully built but fails to log in valid user. Below are code excerpts to explain my challenges. Meaningful contributions would be appreciated. public String extractUserIDFromTextField ( JTextField textField){ return textField.getText(); } public String extractPasswordFromPasswordField (JPasswordField passwordField){ return passwordField.getText(); } THE ABOVE METHODS ARE OF CLASS USER. public boolean validateStudentUserID (JTextField textField ) throws Exception{ return extractUserIDFromTextField(textField).matches ("[a-z]{3}/[0-9]{4}/[a-z]{3}" ;} public boolean studentValidityMethod (JTextField textField, JPasswordField passwordField) { try{ String submittedUserID = extractUserIDFromTextField(textField); String submittedPassword = extractPasswordFromPasswordField(passwordField); connection = DriverManager.getConnection ("jdbc:mysql://localhost:3306/spma", "root", null); statement = connection.createStatement(); resultSet =statement.executeQuery("SELECT matriculationNumber, password FROM studentuser WHERE matriculationNumber = submittedUserID ORDER BY matriculationNumber, password" ;resultSet.next(); String correctUserID = resultSet.getString(1); String correctPassword = resultSet.getString(2); if ((submittedUserID.equals(correctUserID)) & (submittedPassword.equals(correctPassword))) studentValidity = true; else studentValidity = false; } catch(SQLException e){ e.printStackTrace(); } finally { return studentValidity; } THE METHODS ARE OF StudentUser which extends the previous class User Then in the login JFrame, under the event handler method i wrote this: private void logInButtonFieldActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: /** method to grant access to the HomePage is granted if grantAccessToStudentOrNot method returns true or * if otherwise, access is declined with a response message */ try{ if (su.validateStudentUserID(userIDTextField) == true) { if (su.studentValidityMethod(userIDTextField, passwordPasswordField) == true) {this.setVisible(false); hp.setVisible(true); } else JOptionPane.showMessageDialog(null, "You are not a student", "Error", JOptionPane.ERROR_MESSAGE); } After this I run my application and there is no error but the next page HomePage is not displayed. Suggestions are duly welcomed. Lots of appreciation to you guys. |
| Re: Java_desktop_application by a.r.okans(m): 3:51pm On Jan 08 |
Let us chat on gTalk or skype for suggestions. my email is a.r.okans@gmail.com |
| Re: Java_desktop_application by xterra2(m): 6:24pm On Jan 08 |
Are you using Netbeans ? if yes, then try to upload a screenshot here please to see what you have done so far that way i can give suggestions |
| Re: Java_desktop_application by a.r.okans(m): 10:26am On Jan 10 |
[img][/img] |
| Re: Java_desktop_application by xterra2(m): 11:08pm On Jan 10 |
Nice, was thinking of the same project a few months back but i got occupied by many projects of mine Anyway, as of this moment apart from the login screen what other screen do you have ? You posted a non working code of your login- here is a snipet from my own login in my projects i did a year ago
|
| Re: Java_desktop_application by lordZOUGA(m): 11:21pm On Jan 10 |
ermmm.. Why not use git?? (Am assuming by projects you mean software projects though it can manage any thing that is text based) Its opensource and it has been tested. If you don't like the command line or if you want to add features that are particular to students, provide a wrapper application then run git as a seperate process and communicate with it using any IPC method you prefer. |
| Re: Java_desktop_application by LordRahl001: 12:46am On Jan 15 |
a.r.okans: Try adding Class.forName("mysqldriver" ; d mysql deriver shud b smth lyk com.mysql something. Am not actually sure but u did not refer to any database driver here. The only place you can do dis is in javaDB(derby) it sort of broadcast itself like JINI |
| Re: Java_desktop_application by Urine: 9:52pm On Jan 27 |
@Op, have you populated your database? Please post a screen shot of your computer screen, that will make it easier. |
| Re: Java_desktop_application by javadoctor(m): 7:29am On Jan 28 |
The persistence technology you are using is Obsolete.Please go and readUp about Java Persistence API.So you dnt have to go through the pain of logging into the database with the DriverManager class,in Jpa ,the persistence.xml has the persistence unit configured with the entity classes.What ide are you using to develop? JPA has simplified database applications by persisting entity Objects |
| Re: Java_desktop_application by a.r.okans(m): 9:02am On Jan 28 |
javadoctor, im using netbeans. I have heard stuffs about that JPA but ve nt really done anything on it. Please, can we chat? |
| Re: Java_desktop_application by a.r.okans(m): 9:10am On Jan 28 |
Please, guys, im sorry for not giving regular updates on this topic. Actually, im on internship with a software firm in Victoria Island and the beginning of the year is usually filled with activities, so im a bit busy now with office DULLING work that I cannot abandon(that is what I'm being paid for now). I will be completing my stuff there in 3 weeks. Then, I can focus more on this project as I mean to really complete it Insha Allah. Please, suggestions are welcome at any time. Keep them coming in. I am also interested in any1 with JSP and servlets knowledge. Let us exchange ideas and help each other grow, Candles light candles. Thank you. |
| Re: Java_desktop_application by javadoctor(m): 8:12am On Jan 29 |
No p,check for my pin or phone number on my profile |
(0) (Reply)
Learning C++ And Dreamweaver / Visual Basic Help Pls. Other Languages Can Try Too / Great Work guys
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health Links: (0) (1) (2) (3) (4) (5) (6) (7) (8) (9) Nairaland - Copyright © 2005 - 2013 Oluwaseun Osewa. All rights reserved. See Privacy Policy & Nairalist. 54.224.79.93 |