java application



Share on Google+Share on Google+

java application
0 Answer(s)      6 years and 9 months ago
Posted in : JDBC
Hi team rosenet,
I ve used the ideas you gave and created an application.I need to do a modification to this code:

* To change this template, choose Tools | Templates
* and open the template in the editor.
package register;

import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;

* @author Reji Samuel
public class Combo extends JFrame {

private JComboBox clist;
JLabel lblname, lblcol, lblevents, lblsubmit;
JTextField txtid;
JButton button, button1, button2, button3;
JPanel panel;

public Combo() {
panel = new JPanel(new GridLayout(6, 3));
lblname = new JLabel("Participant");
lblname.setBounds(50, 50, 200, 20);
txtid = new JTextField(25);
lblcol = new JLabel("College");
lblcol.setBounds(50, 100, 100, 20);
clist = new JComboBox();
clist.setBounds(200, 100, 100, 20);
button2 = new JButton("Next_entry");
button = new JButton("Submit");
button1 = new JButton("Report");
button3 = new JButton("Exit");
final JCheckBox chk1 = new JCheckBox("Debugging", false);
final JCheckBox chk2 = new JCheckBox("Paper Presentation", false);
final JCheckBox chk3 = new JCheckBox("Quiz", false);
final JCheckBox chk4 = new JCheckBox("Web Designing", false);
setSize(700, 300);
try {
Connection c = DriverManager.getConnection("jdbc:odbc:college");
Statement st = c.createStatement();
ResultSet rs = st.executeQuery("select college from college");
while ( {
} catch (Exception e) {
button.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {
int count = 0;
String v1 = txtid.getText();
String v5 = clist.getSelectedItem().toString();
String v7 = "";
String v9 = "";
String v11 = "";
String v13 = "";
if (chk1.isSelected()) {
v7 = "Debugging";
JOptionPane.showMessageDialog(null, "Chosen Debugging");
} else {
v7 = "";
if (chk2.isSelected()) {
v9 = "Paper Presentation";
JOptionPane.showMessageDialog(null, "Chosen Paper Presentation");
} else {
v9 = "";
if (chk3.isSelected()) {
v11 = "Quiz";
JOptionPane.showMessageDialog(null, "Chosen Quiz");
} else {
v11 = "";
if (chk4.isSelected()) {
v13 = "Web Designing";
JOptionPane.showMessageDialog(null, "Chosen Web Designing");
} else {
v13 = "";
try {
Connection con = DriverManager.getConnection("jdbc:odbc:access");
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from user where organization='" + v5 + "'");
while ( {
if (count >= 2) {
JOptionPane.showMessageDialog(null, "The maximum members permitted for this organization have been already registered");
} else {
int i = st.executeUpdate("insert into user(name,organization,event_1,event_2,event_3,event_4) values('" + v1 + "','" + v5 + "','" + v7 + "','" + v9 + "','" + v11 + "','" + v13 + "')");
JOptionPane.showMessageDialog(null, "You are successfully registered");
} catch (Exception ex) {
button2.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent ae) {
if (ae.getActionCommand() == "Next_entry") {
button3.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent be) {
if (be.getActionCommand() == "Exit") {

* @param args the command line arguments
public static void main(String[] args) {
// TODO code application logic here
Combo test = new Combo();
* Assign a unique id to all sucessfull registered users.
*wen i press report button,I should get a list of name and college in ms word doc of all those selectd debugging,quiz,paper presentation.
*validate the user interface,All should check atleast one event else a message box should display directing us to check and select atleast one.
* when ever i add a new college to the access table,The JCombobox content should update without recompilation...
Please help
View Answers

Related Tutorials/Questions & Answers:
Java Application
Java Application  Hi, What is the applications of Java in development of software? What type of applications can be developed using Java programming Language? Can anyone tell me the url for downloading sample projects in Java
Java Client Application example
Java Client Application example  Java Client Application example
Java Client Application
Java Client Application  Java Client Application
Java application - Java Beginners
Java application  Write a Java GUI application called that inputs several lines of text and a search character and uses String method indexOf to determine the number of occurrences of the character in the text
Java HTML Client Application
Java HTML Client Application  Java HTML Client Application
Batch file for java application
Batch file for java application  please tell me how to create the batch file for java application(using swings).the application is created with netbeans
java reminder Application
java reminder Application  Create an awt application which imitates a reminder application,that stores notes and specify date and time to be reminded
java reminder Application
java reminder Application  Create an awt application which imitates a reminder application,that stores notes and specify date and time to be reminded
JAVA APPLICATION   Hi, I have this question and I'm stuck. Please guide me? Thanks. Write a Java application to implement the program logic... with e : " + strAr[i]); } } } } For more information on Java visit
Fingerprint application with Java
Fingerprint application with Java  Hi, How to create fingerprint application with Java? Thanks   Hi, There are many API in Java which... application with Java. Here are few APIs:
Write a java application program........?
Write a java application program........?  Welcome every One : I have Q in Java? Q : Write a java application program that reads 20 integer numbers input by the user and prints how many numbers > 100 and how many numbers
java application - Framework
java application   Hi How to make .exe or a plateform independent executable file( i think its jar in case of java) of a java code. Thnx
java Application to java Applet
java Application to java Applet  sorry Java master disturb again how can i modify below this Java application to applet because in swtich case i had put this countinue selection source code to make user choosing so hope can
Fax service in Java application.
Fax service in Java application.  Hello, I want to develop a Java application to send fax to any destination fax numbers. Anyone who knows about this, please tell how I can do this. Is there any free libraries
Java application - Java Beginners
Java application  Dear sir, I Designed a Window Throung Swing component Using JDBC. My Problem is that How and What component may used... the following link: Hope
Drools Application in Java
Drools Application in Java  when I have make a drools application using java and eclipse i have a facing a error Unable to instantiate service for Class 'org.drools.builder.KnowledgeBuilderFactoryService' I was searching
Java application PLZ ?
Java application PLZ ?  Write an application that demonstrates each of the following methods, based on the statement String dedicate = ?Dedicated to making your event a most memorable one:; indexOf(?D?) charAt(15) endsWith(one
chat application - Java Beginners
chat application  i hv created a chat application , but i hav facing problem when i run it in lan , pc ping but apllication doent giv ressponce plz help for these if some one have work on java chat application my email id
Distributed application and java
Distributed application and java  Hi, Am about to develop a Java swing application. This software will be used by 20 branch offices and every... like to go forward with the Java swing application only for this. And the way
Java web Application
Java web Application  Hi! I have developed a java web application project using netbean IDE with glassfish server. My question is how to create a runnable file from this. How can we make it to a single file? I think it is war
Fingeprint matching in java application
Fingeprint matching in java application  I am developing a java application which require fingerprint identification and verification. It is a webservice application. following considration we have to take in to mind. 1. if I am
Problem in uploading java application
Problem in uploading java application  I have uploaded my java application (folder created under webapps) using Filezilla FtpClient.Application... application it is showing javax.servlet.ServletException: Parse Error in JSP page
Java application Help?
Java application Help?  Write an application that accepts a users password from the keyboard. When the entered password is less then six characters more then 10 characters, or does not contain at lease one letter and one digit
Constructing Application of Java
Constructing Application of Java   Hi,I am doing project on java as front end and database as back end.I completed it almost on my computer but now I want to distribute it to some other have to convert the java source
java web application - Ant
java web application  hai, iam new to J2EE. i've installed jdk... tell me the steps to build and deploy a small web application on MyEclipse?(like HelloWorld).Please tell me the directory structure to place my java classes
Java application that uses the classes and
Java application that uses the classes and   i have this class diagram with three classes: Curriculum, Course, and Lecture. Your class diagram...) I wish Write a Java application that uses the classes and methods above
Java application - JDBC
Java application  Seasons greetings, I successfully designed the Food festival application using the help rosenet team rendered but it is not exactly the specification i i altered it.I thank rosenet team for their timely
Java application help!
Java application help!  In Deep Water Associates operates a business... (based on the fill-up time) for a pool. Write an application that prompts the user...-up price. Save the application as Parameter Fee for cleaning Pool
Java application Help?
Java application Help?  Write an application that can hold five doubles in an array. Display the doubles from first to last, and then display the doubles from last to first. Save the file as Use the logic
online test application in java
Online Test Application Table Of Contents Introduction To Application Database Design Creating Data Access Object (DAO) Design Pattern Creating Views Writing Actions Mapping Application Admin Module User Module Download
Java Spring Desktop application
Java Spring Desktop application  Hi i am developing a desktop java spring application..It has many Jframes forms and classes...How to close one Jframe from another..Please tell... First jframe package desktopapplication2
Java Spring Hibernate Struts Training java.lang.classnotfoundexception com.mysql.jdbc.driver how to retrieve text and images from mysql database and show on html page using jsp servlet How to install Neo4j on Ubuntu 15.10? please help me in these prog MYSQL - mysql copy table to another table example by creating new table solution for mapping hibernate and pojos from net beans through database Connect GWT application with Oracle inventory System of Medical Store inventory System of Medical Store inventory System of Medical Store inventory System of Medical Store This code have created jTable that connected with a database.every cell of last column have a button.But this button doesn't work properly.Where is the error java program Java Database Program jdbc Database connection class in a live project ..?? What is JDBC architecture? Unable to Create DSN for excel to ms access importing data and edit that data Database Scrolling Buttons how to use foreign key in java How to delete content of a log file from linux terminal? JSP-Oracle connectivity Student Management System Java code for Saving Marathi (Indian local language ) in Mysql and retrieving the same crud operations with foreign key constraint. I really need help with this assignment question Please help me out Please Backup Failed Mysqldump Got Errno 28 On Write Upgrade MySQL 5.1 to 5.5 in cpanel mysqldump all databases com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jpa.sequence' doesn't exist persistence xml class element persistence.xml for MySQL MySQL JDBC Driver pom dependency code Blob column jdk6 and oracle 8i connexion oracle 8i et jdk6 java [ cannot retrive date from sql ] why?? Order Entry System How to threow timeout exception when DB is not responding How to threow timeout exception when DB is not responding This is the employee form to add data to mysql database but I got error of NullPointerException, Is this write code please give me feedback as soon as possible make a method which takes user name & pwd as parameter & validate them against the database. If the corresponding user exist return true otherwise false. prabhakar validating credentials and displaying error message in login .jsp if not valid JDBC jdbc jdbc code register servlet vibhu


Advertisement null