Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #3247

FIRST...add number in cell but cannot run when i set calculation in button calculate in action performe

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date Mon, 25 Apr 2011 05:34:38 -0500
From MOHAMAD HAZIZI BIN MOHAMAD AKHIR <user@compgroups.net/>
Subject FIRST...add number in cell but cannot run when i set calculation in button calculate in action performe
Newsgroups comp.lang.java.programmer
UserIpAddress 121.121.141.145
InternalId 67888202-17d1-466c-8c45-45537f1f4072
Message-ID <ItqdnbdM4sGj0yjQnZ2dnUVZ_qadnZ2d@giganews.com> (permalink)
Date Mon, 25 Apr 2011 05:34:38 -0500
Lines 143
X-Usenet-Provider http://www.giganews.com
X-Trace sv3-atqxgP9bbxXLZiA2TyGWnhcWZEvi3h0GAFn1QqSb9AIutlIdYA5BxAwf5htHLwNJ0f0XUlggjiq7i0a!kD8O9WxSzjyCq+Kk8hJIa/egkqPnAsofEJOne2/WS/ogXLwgOrW5/OaazVg0lKg+1tOF70QNLA==
X-Complaints-To abuse@giganews.com
X-DMCA-Notifications http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Lines 3
X-Original-Bytes 6654
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3247

Show key headers only | View raw


import java.awt.*;
import java.awt.Color;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.border.*;
import javax.swing.JComboBox;
import java.text.DecimalFormat;
import javax.swing.JTable;

public class Details extends JFrame implements ActionListener
{
    private JFrame f1, f2, f3;
    
    private JLabel lblTitle, lblName, lblIC, lblDsh1, lblDsh2, lblAddress, lblPostalCode, lblCity, lblTel, lblHome, lblHP, lblOffice, lblFax, lblEmail;
    private JLabel lblReference, lblDate, lblCashier, lblSalesman, lblTotal;
    
    private JTextField txtName, txtIC1, txtIC2, txtIC3, txtID4, txtAddress, txtPostalCode, txtCompName, txtCompAddress, txtID1, txtID2, txtID3;
    private JTextField txtReference, txtDate, txtCashier, txtSalesman, txtTotal, txtHome, txtHP, txtOffice, txtFax, txtEmail;
    
    private JButton btnNext1, btnBack1, btnClear1, btnExit1;
    private JButton btnBack2, btnClear2, btnExit2;
    private JButton btnView, btnPrint, btnCalculate;
    
    private JCheckBox chkMr, chkMiss, chkMrs, chkMs;
    
    private JRadioButton rbtnCash, rbtnCreditCard, rbtnCheque, rbtnMoneyOrder, rbtnOther;
    
    private JComboBox cmbCity;
    
    private JTable table1;
    
    private JPanel pnlTitle, pnlIC, pnlTel1, pnlTel2, pnlTel3, pnlFax, pnlTel, pnlTelephone, pnlPostal, pnlCity, pnlInformation, pnlInformation1;
    private JPanel pnlEmail, pnlInfo, pnlButton1;
    private JPanel pnlDetail, pnlDetail1, pnlTable, pnlFrame2, pnlTotal, pnlButton2, pnl2, pnl3, pnlBtn, pnlRbtn;
    
    private ButtonGroup group1;

    private String[] City = {"--Choose--","Johore","Malacca","Kuala Lumpur","Selangor","Putrajaya","Kedah",
                             "Kelantan","N.Sembilan","Pahang","Pulau Pinang","Perak","Perlis","Terengganu","Labuan","Sabah","Sarawak"};
                             
                             
    private String data[][] = { {"", "","", "", ""}, {"", "","", "", ""}, {"", "","", "", ""}, {"", "","", "", ""}, 
                             {"", "","", "", ""}, {"", "","", "", ""}, {"", "","", "", ""}, {"", "","", "", ""}, {"", "","", "", ""}, {"", "","", "", ""} };
                             
    private String col[] = {"NO", "DESCRIPTION","QUANTITY", "PRICE(UNIT)", "AMOUNT(RM)"};
    
                              
    public Details()
    {
        FlowLayout layout = new FlowLayout();
        
        f1 = new JFrame("a");
        f1.getContentPane();
        f1.setLayout(new GridLayout(1,1));
        
        f2 = new JFrame("b");
        f2.getContentPane();
        f2.setLayout(new GridLayout(1,1));
        
        f3 = new JFrame("b");
        f3.getContentPane();
        f3.setLayout(new GridLayout(1,1));
        
        lblTitle = new JLabel("TITLE\t");
        lblName = new JLabel("NAME\t");
        lblAddress = new JLabel("ADDRESS\t");
        lblIC = new JLabel("IC NUMBER\t");
        lblDsh1 = new JLabel("-");
        lblDsh2 = new JLabel("-");
        lblPostalCode = new JLabel("POSTAL CODE\t");
        lblCity = new JLabel("CITY\t");
        lblTel = new JLabel("TELEPHONE NUMBER\t");
        lblHome = new JLabel("(HOME)\t");
        lblHP = new JLabel("(H/P)\t");
        lblOffice = new JLabel("(OFFICE)\t");
        lblFax = new JLabel("FAX\t");
        lblEmail = new JLabel("E-MAIL\t");
        
        lblReference = new JLabel("REFERENCE");
        lblDate = new JLabel("DATE");
        lblCashier = new JLabel("CASHIER");
        lblSalesman = new JLabel("SALESMAN");
        lblTotal = new JLabel("TOTAL(RM)");
        
        txtName = new JTextField(20);
        txtAddress = new JTextField(30);
        txtPostalCode = new JTextField(5);
        txtIC1 = new JTextField(6);
        txtIC2 = new JTextField(2);
        txtIC3 = new JTextField(4);
        txtID1 = new JTextField("+60", 3);
        txtID1.setEditable(false);
        txtID2 = new JTextField("+60", 3);
        txtID2.setEditable(false);
        txtID3 = new JTextField("+60", 3);
        txtID3.setEditable(false);
        txtID4 = new JTextField("+60", 3);
        txtID4.setEditable(false);
        txtHome = new JTextField(9);
        txtHP = new JTextField(9);
        txtOffice = new JTextField(9);
        txtFax = new JTextField(9);
        txtEmail = new JTextField(20);
        
        txtReference = new JTextField(20);
        txtDate = new JTextField(20);
        txtCashier = new JTextField(20);
        txtSalesman = new JTextField(20);
        txtTotal = new JTextField(20);
        txtTotal.setEditable(false);
        
        btnNext1 = new JButton("NEXT");
        btnBack1 = new JButton("BACK");
        btnClear1 = new JButton("CLEAR");
        btnExit1 = new JButton("EXIT");
        
        btnBack2 = new JButton("BACK");
        btnClear2 = new JButton("CLEAR");
        btnExit2 = new JButton("EXIT");
        btnView = new JButton("SUBMIT");
        btnCalculate = new JButton("CALCULATE");
        
        chkMr = new JCheckBox("MR");
        chkMiss = new JCheckBox("MISS");
        chkMrs = new JCheckBox("MRS");
        chkMs = new JCheckBox("MS");
        
        cmbCity = new JComboBox(City);
        
        rbtnCash = new JRadioButton("CASH");
        rbtnCreditCard = new JRadioButton("CREDIT CARD");
        rbtnCheque = new JRadioButton("CHEQUE");
        rbtnMoneyOrder = new JRadioButton("MONEY ORDER");
        rbtnOther = new JRadioButton("OTHER");
        
        group1 = new ButtonGroup();
        group1.add(rbtnCash);
        group1.add(rbtnCreditCard);
        group1.add(rbtnCheque);
        group1.add(rbtnMoneyOrder);
        group1.add(rbtnOther);

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar


Thread

FIRST...add number in cell but cannot run when i set calculation in button calculate in action performe MOHAMAD HAZIZI BIN MOHAMAD AKHIR <user@compgroups.net/> - 2011-04-25 05:34 -0500
  Re: FIRST...add number in cell but cannot run when i set calculation in button calculate in action performe "John B. Matthews" <nospam@nospam.invalid> - 2011-04-25 11:06 -0400

csiph-web