plz anyone can solve my

plz anyone can solve my

creat an applet prog which accepts the details of 10 customers like name , address , city , ect. and display it

View Answers

March 15, 2012 at 3:23 PM

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.table.*;
class SwingExample extends JFrame{
     int count=0;
JButton b;
JLabel label1,label2,label3;
JTextField text1,text2,text3;
SwingExample(){
setLayout(null);
label1 = new JLabel();
label1.setText("Name:");
text1 = new JTextField(20);

label2 = new JLabel();
label2.setText("Address:");
text2 = new JTextField(20);

label3 = new JLabel();
label3.setText("City:");
text3 = new JTextField(20);

b=new JButton("ADD");
label1.setBounds(20,20,100,20);
text1.setBounds(120,20,100,20);

label2.setBounds(20,50,100,20);
text2.setBounds(120,50,100,20);

label3.setBounds(20,80,100,20);
text3.setBounds(120,80,100,20);

b.setBounds(120,110,80,20);

add(label1);
add(text1);
add(label2);
add(text2);
add(label3);
add(text3);
add(b);
setVisible(true);
setSize(500,300);
final DefaultTableModel model = new DefaultTableModel();
        final JTable table = new JTable(model);

model.addColumn("Name");
model.addColumn("Address");
model.addColumn("City");
b.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
count++;
String value1=text1.getText();
String value2=text2.getText();
String value3=text3.getText();



model.addRow(new Object[]{value1,value2,value3});
JScrollPane pane = new JScrollPane( table );
    JFrame f=new JFrame();
    f.setVisible(false);
    f.setSize(400,400);
    f.add(pane);
    if(count==10){
     f.setVisible(true);
    }
    text1.setText("");
    text2.setText("");
    text3.setText("");

}
});
}
public static void main(String[]args){
    new SwingExample();
}
}









Related Tutorials/Questions & Answers:
plz anyone can solve my
plz anyone can solve my  creat an applet prog which accepts the details of 10 customers like name , address , city , ect. and display it   import java.awt.*; import javax.swing.*; import java.awt.event.*; import
plz solve my query?
plz solve my query?  how to remove all the options from select control in html using java script?   JavaScript remove all items <html> <script language="javascript" > function removeAllItems(selectbox
Advertisements
how the answer is 13 can anyone explain plz
how the answer is 13 can anyone explain plz  public class that { public static void main(String arr[]) { int i=3; int j=1; while(i<4) { //j=i; i=i+j/2; } System.out.println(i
hello. can anyone help me with my java project, using jcreator?
hello. can anyone help me with my java project, using jcreator?  this is how it goes.. we are to develop a GUI of a certain form, in my case this one... just couldn't solve it.. alot of errors.. pls do help... thanks
CAN ANYONE SOLVE THIS FOR ME. URGENT HELP NEEDED. PLEASE HELP
CAN ANYONE SOLVE THIS FOR ME. URGENT HELP NEEDED. PLEASE HELP   The Task Write a class whose objects will represent students...?? otherwise. The overall mark can be calculated by multiplying both
CAN ANYONE SOLVE THIS FOR ME. URGENT HELP NEEDED. PLEASE HELP
CAN ANYONE SOLVE THIS FOR ME. URGENT HELP NEEDED. PLEASE HELP   Write a class whose objects will represent students.The class should have three... to 40 and ââ?¬Å?failââ?¬Â? otherwise. The overall mark can
ArrayList question plz solve it
ArrayList question plz solve it  An arraylist object stores an Emp Object, where there is name,age,address of the employee is stored, And i want to access the data in the basis of age based? Provide answer to the question
plz help meto solve this question
plz help meto solve this question  for a file that exist what will be the length() method in the file class return
how can i add wirecard option(or button ) at my web page plz tell all steps? View Answers
how can i add wirecard option(or button ) at my web page plz tell all steps? View Answers  how can i add wirecard option(or button ) at my web page plz tell all steps? View Answers
solve my question shortly
solve my question shortly  <html> <head> <script> function checkphoneNumber(number){ if(/[^\d ]/.test(number.... I have corrected your errors now you can run your code easily. I have also made
Solve my code
Solve my code  import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; import java.io.*; public class ChangeDetails extends HttpServlet{ public void doPost(HttpServletRequest request,HttpServletResponse
OCI Connectivity For Oracle Plz Solve This Error
) { e.printStackTrace(); } } } ---> I found Error below how i can solve this error plz...OCI Connectivity For Oracle Plz Solve This Error  import java.io.*; import java.sql.*; import java.lang.*; import oracle.jdbc.OracleDriver; public
OCI Connectivity For Oracle Plz Solve This Error
) { e.printStackTrace(); } } } ---> I found Error below how i can solve this error plz...OCI Connectivity For Oracle Plz Solve This Error  import java.io.*; import java.sql.*; import java.lang.*; import oracle.jdbc.OracleDriver; public
plz solve this program - Java Interview Questions
plz solve this program  write a program to out put this resault using two dimensional array this is an image of the reasult: http://www.4shared.com/file/154846107/dc2f1ac1/_2__Untitled-1.html so help me
Please Help To Solve My Problem
Please Help To Solve My Problem  PHP I Have 6 Textbox and 1 ok button. 6 Textbox to Add the 6 Team Name. Each Team Name In String(Like- A,B,C,D,E,F... With B Team when A Team Play With B Team Again Then Generate Error. I Am Solve
anyone willing to look over my code? (java)
anyone willing to look over my code? (java)  package inorder.without.cheats; import java.util.Arrays; import javax.swing.JOptionPane; public class InOrderWithOutCheats { public static void main(String[] args
Can anyone assist with the coding of this game?
Can anyone assist with the coding of this game?  I am in need of the coding for this game. I need to write a "Hangman" game that will randomly generate a word from a text file and will prompt the user to guess one letter
Small Bug How to solve in my code
Small Bug How to solve in my code  String season=""; pst = con.prepareStatement("SELECT DISTINCT(Season) season FROM specialdates where Regid...") + ","; it shows bug in findbugs tool.. but it executes successfully how to solve
help me about to solve my qustion
help me about to solve my qustion   An employee receives 15 SR per hour for the first 8 hours of week. After 8 hours (overtime) his rate becomes 20 SR per hour . Write a java class that ask a user to enter the number of hours he
plz. answer my ques - Java Beginners
plz. answer my ques  I want to ask a prog. prob which would create a prog that would simply take username and password as input and will display... such type of program is possible in c.  can you mention technology
can interface solve this problem in java
can interface solve this problem in java  I have a JDialog which displays the calendar [from 2010-2020], i created this in a different class... this calander class. can interface solve this problem. If yes then how. pls
how should i can solve
how should i can solve  Web based program - Input - Person's contact details with Passport Number as Unique Key. Save data in to oracle / MySQL. Output - List of Persons saved in the database. Technology to be used - JSP
can anyone help me to implement strength of the password - Security
can anyone help me to implement strength of the password  hi.. i have to implement password strength detection algorithm. How can i use dictionary in linux system
sir plz do respond to my problem immediately - Java Beginners
code(sent by you).plz inject that code into my browser code so that it can show...sir plz do respond to my problem immediately  Hello sir, Iam very happy that you have responded to my problem.The code u sent
plz try to clear my doubt for shuffling multi-dimensional array
plz try to clear my doubt for shuffling multi-dimensional array  hi, if v r using Arrays.asList() means, it may shuffle the row wise list only... v...??? plz help me... thanks in advance   Hi Friend, Try the following code
it is a linux program is there anyone who can help me out with it?
it is a linux program is there anyone who can help me out with it?  Write a Bash script that prompts the user for a user-ID and displays the corresponding userââ?¬â?¢s login name, ownerââ?¬â?¢s name, and his/her home directory
Can u Look to the error plz - Java Beginners
Can u Look to the error plz  this is my code can u modify it plz and give me the result of it when u check it on eclipse or jcreator plz and i will be more thankfull if u do that :) , oh yeh one thing can you draw a flag
How can I to my database to my application
How can I to my database to my application  How can I to my database to my application   Hi, Please see the JDBC discussion thread.ADS_TO_REPLACE_1 Thanks
plz check my codings are correct or not...There is an error..i cant find it..
plz check my codings are correct or not...There is an error..i cant find it..  import java.util.Scanner; public class Student { private String indexNo; private String gender; private char initial; private int mark1
it is a linux question is there anyone who can help me out with it?
it is a linux question is there anyone who can help me out with it?  Write a script that accepts three numbers as parameters. Your script should add the first two numbers together and then call a second script that accepts two
can u plz try this program - Java Beginners
can u plz try this program  Write a small record management application for a school. Tasks will be Add Record, Edit Record, Delete Record, List Records. Each Record contains: Name(max 100 char), Age, Notes(No Maximum Limit
How can we solve this puzzle using java ?
How can we solve this puzzle using java ?  Sachin likes sweets a lot... contiguous stalls. So, he can buy from as many stalls as he wants, but all... will be the total cost of all possible ways of buying sweets. Can you help him
Solve it
Solve it  How to calculate the value which contains oparator and operand both using command line argument
solve this
solve this   Create a student class. The student object should have studentid, studentname, subject and marks as properties. Also generate the getter and setter methods. Create 5 objects of this class and populate values
need source code fir automatic timesheet filling. can anyone peass help?
need source code fir automatic timesheet filling. can anyone peass help?  Hi friends, I wants to develop a software that should automatically fills the time sheet using the login and log out entries. Can anyone please help me
ModuleNotFoundError: No module named 'anyone'
ModuleNotFoundError: No module named 'anyone'  Hi, My Python... to install padas library. You can install anyone python with following command... 'anyone' How to remove the ModuleNotFoundError: No module named 'anyone'
ModuleNotFoundError: No module named 'anyone'
ModuleNotFoundError: No module named 'anyone'  Hi, My Python... to install padas library. You can install anyone python with following command... 'anyone' How to remove the ModuleNotFoundError: No module named 'anyone'
ModuleNotFoundError: No module named 'anyone'
ModuleNotFoundError: No module named 'anyone'  Hi, My Python... to install padas library. You can install anyone python with following command... 'anyone' How to remove the ModuleNotFoundError: No module named 'anyone'
How can I find my DHCP IP address on my computer?
How can I find my DHCP IP address on my computer?  Hi, I am using Ubuntu and I trying to find the IP address assigned to my computer by DHCP server. How to find the IP address? Thanks   Hi, You can try following
How can I connect my database to my application ?
How can I connect my database to my application ?  How can I connect my database to my application?   Hi, You can use JDBC API to connect to database from your Java application.ADS_TO_REPLACE_1 Here is the sample
i want to find the byte code of a image file ... for my project..plz if anybody help me for java coding i will grateful..
i want to find the byte code of a image file ... for my project..plz if anybody... a image file to its byte code format that help me for the pattern matching in my project.. but i cant convert Image file to its byte code format.. if anybody can plz
A few questions related to developing a blog....can anyone please help me out??
A few questions related to developing a blog....can anyone please help me out... jsp.I have a few questions.... Can anyone tell me if we can insert images...??If it is possible then how is it done?? If we can insert images in the textarea then how
can u plz explain the http request methods - JSP-Servlet
can u plz explain the http request methods  can u plz explain http... duplicate entries in the MySQL database we can follow one of these following approach... we can execute following query: Query CREATE TABLE backup_table AS SELECT
plz help me any one as fast as u can
plz help me any one as fast as u can  A thief Muthhooswamy planned... is the number of metres he can jump (1<=climbUp<=10^10) climbDown... Sample Input 1: 10:1:1:{10} Here Muthooswamy can jump 10 metres height
How can i modify my account in roseindia
How can i modify my account in roseindia  Presently am not using my gmail id. I have to modify my roseindia account. Please send the answer to following mail id
How can I protect my database password ?
How can I protect my database password ?   How can I protect my database password ? I'm writing a client-side java application that will access... in as plain text. What can I do to protect my passwords
Can I put coursera on my resume?
Can I put coursera on my resume?  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: Can I... so that I can learn the topic "Can I put coursera on my resume?"
Can I put online courses on my CV?
Can I put online courses on my CV?  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: Can... links so that I can learn the topic "Can I put online courses on my CV?"
Can I learn Hadoop on my own?
Can I learn Hadoop on my own?  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: Can I... that I can learn the topic "Can I learn Hadoop on my own?". Also tell me
Can I learn R on my own?
Can I learn R on my own?  Hi, I am beginner in Data Science... on my own? Try to provide me good examples or tutorials links so that I can learn the topic "Can I learn R on my own?". Also tell me which

Ads