java application
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() {
super("OnSpot_Registration");
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);
clist.setMaximumRowCount(10);
button2 = new JButton("Next_entry");
button = new JButton("Submit");
button1 = new JButton("Report");
button3 = new JButton("Exit");
panel.add(lblname);
panel.add(txtid);
panel.add(lblcol);
panel.add(clist);
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);
panel.add(chk1);
panel.add(chk2);
panel.add(chk3);
panel.add(chk4);
panel.add(button2);
panel.add(button);
panel.add(button1);
panel.add(button3);
setSize(700, 300);
setVisible(true);
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection c = DriverManager.getConnection("jdbc:odbc:college");
Statement st = c.createStatement();
ResultSet rs = st.executeQuery("select college from college");
while (rs.next()) {
clist.addItem(rs.getString("college"));
}
} catch (Exception e) {
e.printStackTrace();
}
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 {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:access");
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from user where organization='" + v5 + "'");
while (rs.next()) {
count++;
}
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) {
System.out.println(ex);
}
}
});
button2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
if (ae.getActionCommand() == "Next_entry") {
txtid.setText("");
}
}
});
button3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent be) {
if (be.getActionCommand() == "Exit") {
System.exit(0);
}
}
});
add(panel);
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Combo test = new Combo();
test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
modifications...
* 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 ApplicationJava 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 application - Java BeginnersJava application Write a
Java GUI
application called Index.java 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
Advertisements
JAVA APPLICATION - Java BeginnersJAVA 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
Batch file for java applicationBatch 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 Application to java Appletjava 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
Java application - Java BeginnersJava 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:
http://www.roseindia.net/
java/example/
java/swing/Print.shtml
Hope
java reminder Applicationjava reminder Application Create an awt
application which imitates a reminder
application,that stores notes and specify date and time to be reminded
java reminder Applicationjava reminder Application Create an awt
application which imitates a reminder
application,that stores notes and specify date and time to be reminded
Fingerprint application with JavaFingerprint
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:
http://www.griaulebiometrics.com/en-us
java application - Frameworkjava 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
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
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
chat application - Java Beginnerschat 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
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
Drools Application in JavaDrools
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 web ApplicationJava 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
Problem in uploading java applicationProblem 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
Fingeprint matching in java applicationFingeprint 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
Distributed application and javaDistributed
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
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 computer.so have to convert the
java source
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
java web application - Antjava 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 - JDBCJava application Seasons greetings,
I successfully designed the Food festival
application using the help rosenet team rendered but it is not exactly the specification i said.so 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 Swimming.java.
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 DblArray.java. Use the logic
Java Spring Desktop applicationJava 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
online test application in javaOnline 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 simple applicationjava spring simple application hai I have design a simple
application in this I always found class not found exception. I am sendig code as follows please resolve this and send me.my directory structure is as follows
Project
java application - JDBCjava application Hi team rosenet,
I ve used the ideas you gave and created an application.I need to do a modification to this code... main(String[] args) {
// TODO code
application logic here
deploy application - Java Beginnersdeploy application i want to deploy to tom cat server a web
application using a eclips IDE. i already start the server but haven't no idea how to create the the war file using eclips. i pleasure if any one can help me. alsp
Java Bouncing ApplicationJava Bouncing Application Hi
I'm using Eclipse ide to add more implementation to this simple bouncing program. I'm having trouble implementing the following:
-adding functionality of buttons and having color chooser
-able
online test application in javaonline test
application in java Can questions come in html file... radiobuttons in our
application, you can take textarea, textfield etc. Here we have created... the following link:
http://www.roseindia.net/jsp/online-quiz-
application-jsp.shtml
Java swimming applicationJava swimming application In deep water associates operate a business that offers a variety of services to customers who own swimming pools, including cleaning and filling pools. Create pool class that calculates the price
java application/applet - Java Beginnersjava application/applet In this project, the student has to develop and submit a program for a
Java application / applet which contains a set of GUI components as detailed below.
1. The
Java applet page/
application models
convert java Application to Java Appletconvert
java Application to
Java Applet hi every
Java Master or
Java Professional , my Name Is Vincent i'm
java beginner can i ask a question regarding for
Java application convert to
Java Applet. below her is my sample
convert java Application to Java Appletconvert
java Application to
Java Applet hi every
Java Master or
Java Professional , my Name Is Vincent i'm
java beginner can i ask a question regarding for
Java application convert to
Java Applet. below her is my sample
Java Application change to java applet Java Application change to
java applet Hi every
Java Masters i'm
Java beginner ,and i want below this figures source code convert to
Java Applet hope every Masters can helping thank .
import java.util.*;
import java.text.
java Application Convert to java Appletjava Application Convert to
java Applet Hi every
Java Masters i'm
Java beginner ,and i want below this figures source code convert to
Java Applet hope every Masters can helping thank .
import java.util.*;
import java.text.
run a java application - Java Beginnersrun a
java application Hai Deepak,
I ve set my environment...;
CLASSPATH= C:\Program Files\Apache Tomcat 4.0\common\lib\servlet.jar;
JAVA_HOME=C:\Program Files\
Java;
path=C:\Program Files\
Java\jdk1.6.0_06\bin;
My
current application cursor - Java Beginnerscurrent
application cursor Hi all,
I want to design one tool for that i need to find out the
application in which is running among other
application.(if currently three
application is running means i want to find out
Sms to mobile using java applicationSms to mobile using
java application Hi,
i want to send sms to mobile using
java application.
But i dont have any idea for this procees.
So kindly suggest me any ideas.
regards
vijayalakshmi
java hello and timer alert applicationjava hello and timer alert application Hi,
Please help me create a simple
Java application that can display "Hello world" and current Time alert on mobile device screen using mobile screen emulator.
Regards