plz anyone can solve my

Ads
 

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();
}
}

Ads









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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Solve it
Solve it  How to calculate the value which contains oparator and operand both using command line argument
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
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
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
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
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
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

Ads