Home Answers Viewqa Applet plz anyone can solve my

 
 


aiman ameen
plz anyone can solve my
1 Answer(s)      a year and 3 months ago
Posted in : Applet

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 Pages:
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
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
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
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
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
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
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
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
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
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
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
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
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
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
my assignment
...this is my assignment....plz...my assignment  as programmer, you have been assigned to develop... menu consist of food and drink with prices included.the user can make a selection
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
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
solve this pbm
solve this pbm  sir rows are also inserting i have checked in the database also the rows are not affected in the table . The first pbm wich i have... can execute the program
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
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
plz help - Java Beginners
plz help  i have to programs and it takes too long to run them so i..... but i dont know how to aplly that on my 2 programs: the first code... some operations ... how can i makes them as thread first code: import
plz Help me - Java Beginners
plz Help me  Hi, I want learn struts,I dont have any idea about this plz help how can i make a framework.If u have any information then plz send my personal id plz tell me that whose software installed.and give me brief
doubt in my program code - Java Beginners
doubt in my program code  i have developed a web browser... we can see as the name of all the buttons.my question is i need to change the name on that button.can u please help me out to solve this problem.if u need
NAME SORTING. . .anyone? - Java Beginners
NAME SORTING. . .anyone?  how can I sort names without using the 'name.sort' method? please help. . .anyone? the program should sort the first three(3) letters of the names tnx java masters out there!! (^_^) cVm  Hi
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
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
i need help plz .... Quickly
i need help plz .... Quickly   how can i count how many numbers enterd by the user so the output would be like this Total number of Scores = .... this is my code :- import java.util.Scanner; public class SCORES { public
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. Thanks
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
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
Solve this problem plzzz
Solve this problem plzzz  Prashant.jsp (this is my JSP file) <... kindly help me and check all those files and solve my problem as soon as possible...; <H1>My First Project</H1> <form action=" /Prashant
Solve it
Solve it  How to calculate the value which contains oparator and operand both using command line argument
help me to solve this question...
help me to solve this question...  Given below is a class definition for Book. Type and compile the class, and answer the following questions... price; } } Write a program in a class TestBook that can do the following: Read
help me to solve this problem..
help me to solve this problem..  Given below is a class definition for Book. Type and compile the class, and answer the following questions: class...; } } Write a program in a class TestBook that can do the following: Read
help me to solve this question
help me to solve this question   A user needs to key in data... name, School, course code, course name, session, semester A user can edit the data... code, course name, session, semester A user can display all the records
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
I couldn't solve it
I couldn't solve it  *A customer who wants to apply for getting a car... to the request ID. Each employee has a maximum number of 50 requests that s/he can... arrays in the class Office. In the other classes, you can only use instances
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
regarding css file in my eclipse
the output is not changing can anyone please tell me a solution regarding...regarding css file in my eclipse  hai frns i want a small help frm u.when ever i use css file in html or normal web browsers the output is coming
php brute force code.. hlp plz .....
on ... to last combination so please edit my script so that i can get my project...php brute force code.. hlp plz .....  hello friends, from somewhere i got a code that can generate all posible combination via recursive function
how to solve an internet connection problem
how to solve an internet connection problem  when i run my application it give me this error: Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: Not yet implemented the problem is that i don`t know
plz help me - Java Interview Questions
plz help me  1)Rewrite the method in exercise 10 such that it use...; if the array or sorted , the high-speed binary search can be used as follow... " you should solve this problem in two ways: using iteration and recursion 2
how can i run tomcat server and my home page come when i double click on an icon in servlets
how can i run tomcat server and my home page come when i double click on an icon in servlets  Hi.. there if we are giving a small application to end... and open his application.. so is there any chance in servlets to solve
how can i run tomcat server and my home page come when i double click on an icon in servlets
how can i run tomcat server and my home page come when i double click on an icon in servlets  Hi.. there if we are giving a small application to end... and open his application.. so is there any chance in servlets to solve