akhilapraveen

Active member
  • Jun 2, 2008
    335
    72
    28
    sorry for the noob question, but
    how to use proper java 3 tier architecture in a swing application?...


    guys when you ask questions please mention all the details.coz there are many ways to do any kinda job in java..

    The Swing toolkit includes a rich set of components for building GUIs and adding interactivity to Java applications. Swing includes all the components you would expect from a modern toolkit: table controls, list controls, tree controls, buttons, and labels.

    modern days we use IDEs for this.

    hope this will help you

    http://channukambalyal.tripod.com/NTierArchitecture.pdf
     

    sharpan

    Member
    Oct 22, 2009
    627
    13
    0
    Na brother. ur wrng! to read a simple barcode camera is enough! im not talkin about high level barcode systems.. but barcode is just a picture! it has data hidden all over it! lik a encrypted message!
    man kiwwe barcode eken number ekak text field ekakata ganna hati witarai bro. api ewidiyata register mark up project ekak kara. n it worked
     

    akhilapraveen

    Active member
  • Jun 2, 2008
    335
    72
    28
    just a small pro bro ,

    it should work in command prompt


    your problem is not clear, i mean you have not mentioned weather a constructors are used or not. so i implemented methods for all

    public class Customer {
    int cusNo;
    String name;
    String address;
    double salesValue;

    public void setData(int pcusNO,String pname,String paddress,int psalesValue){
    cusNo=pcusNO;
    name=pname;
    address=paddress;
    salesValue=psalesValue;
    }

    public void display(){

    System.out.println("name is:" +name+" cusNO is: "+cusNo+" address is: "+address+"salesvalues are:"+salesValue);

    }
    }

    class RegularCustomer extends Customer{


    double discount;
    double amountPayable;


    public void setData(int pcusNO,String pname,String paddress,int psalesValue,double pdiscount){
    super.setData(pcusNO, pname, paddress, psalesValue);

    discount=pdiscount;

    }

    public void calculateAmountPayable(double TOTAL){

    amountPayable=TOTAL-discount;

    }


    public void display(){
    super.display();
    System.out.println("Discount is "+discount+" Amount payable is "+amountPayable);
    }



    }
     

    akhilapraveen

    Active member
  • Jun 2, 2008
    335
    72
    28
    MACHAN,JAVA IGENA GANNA SINHALA SITE NADDA?


    na machan tibbat hoda site ekak na..

    java igena gnna language eka prashnayak karaganna epa!

    mata hoda site ekak liyanna hite tiyanawa..me dawas wala exams tikak tiyanwa..so ita passe balamu..
     

    adasi

    Member
    Jul 1, 2011
    22
    0
    0
    41
    Ruwanwella
    if you need help with any kinda java problems, Post here
    Happy to help!



    :DAdasigama

    Dear Akhila ayya.....

    Mama small
    java programer kenek.... Oyata puluwanda mata udawwak karanna....Java application ekak haraha kohomada serial port ekata program karanne kiyala...mata one Banking software wala wage..Button ekak haraha kelinma printer eken print karawa ganna(Pass book ekak print karanawa wage)..puluwannam help ekak denna...
     

    Ashhab

    Well-known member
  • Jan 12, 2009
    1,712
    97
    63
    33
    GalleStar
    thanks dude ,

    www.gallestar.com



    your problem is not clear, i mean you have not mentioned weather a constructors are used or not. so i implemented methods for all

    public class Customer {
    int cusNo;
    String name;
    String address;
    double salesValue;

    public void setData(int pcusNO,String pname,String paddress,int psalesValue){
    cusNo=pcusNO;
    name=pname;
    address=paddress;
    salesValue=psalesValue;
    }

    public void display(){

    System.out.println("name is:" +name+" cusNO is: "+cusNo+" address is: "+address+"salesvalues are:"+salesValue);

    }
    }

    class RegularCustomer extends Customer{


    double discount;
    double amountPayable;


    public void setData(int pcusNO,String pname,String paddress,int psalesValue,double pdiscount){
    super.setData(pcusNO, pname, paddress, psalesValue);

    discount=pdiscount;

    }

    public void calculateAmountPayable(double TOTAL){

    amountPayable=TOTAL-discount;

    }


    public void display(){
    super.display();
    System.out.println("Discount is "+discount+" Amount payable is "+amountPayable);
    }



    }
     

    akhilapraveen

    Active member
  • Jun 2, 2008
    335
    72
    28
    :DAdasigama

    Dear Akhila ayya.....

    Mama small
    java programer kenek.... Oyata puluwanda mata udawwak karanna....Java application ekak haraha kohomada serial port ekata program karanne kiyala...mata one Banking software wala wage..Button ekak haraha kelinma printer eken print karawa ganna(Pass book ekak print karanawa wage)..puluwannam help ekak denna...


    malli serial port eken oyata ona deyak karanna puluwan!

    printer ekata set wenne parallel cable eka..so you can program it easily.
    but do u knw wat are tha data bits and status bits(status registry) and ack bits of tha parallel port??

    ewa tika dannattam oka liyanna tikak amarui

    if u knw them

    try this in visual CMD

    void _stdcall Out32(short PortAddress,short data);
    void main(){
    for(; ; ){

    Out32(0x378,0xff)


    }

    }


    meka terenawada kiyala kiyanna..otherwise you stil got lot to learn malla

    if u get this i can help u to create tha java code
     

    kushame

    Junior member
  • Aug 18, 2010
    284
    12
    18
    jata java walin hoda project idea ekak kiyannako final project ekate
    it's will be big help to me
    mokak hari alut deyak hhmm
    thanks yaluwa
     

    akhilapraveen

    Active member
  • Jun 2, 2008
    335
    72
    28
    jata java walin hoda project idea ekak kiyannako final project ekate
    it's will be big help to me
    mokak hari alut deyak hhmm
    thanks yaluwa


    hamoma karanawa wage database systems hadanne natuwa alut deyak karana eka maxxa.

    make a software which connects to internet and do something..you can easily surf internet using java!

    mama software ekak kala tv freak kiyala hope you know about that!(I posted a thread also)

    its a software about searching streaming links fot tv epsiodes you wanna watch!
    it realy made a differnt in internet society. coz its the only software that does it.. so think something new.. take ur time... minissu online gihilla karana wadak software ekakin karanna puluwan unama eka nikanma hit wenawa..i knw coz i still get huge number of downloads per day!

    machn i love java hope u do 2.. so ona help ekak dennam..

    podi idea ekak ganna meka bala balapan
    mage wadak

    http://www.gettvfreak.com/p/download-tv-freak.html
     

    cybz

    Member
    Oct 29, 2009
    172
    3
    0
    machan applet ekak tama use karanna wenne,but just use tha visibility option

    EX=

    when the user click, visibility of tha jtextbar is on.otherwise off.
    I think you knw tha coding fr this if you dont here it is,

    jtext1.setVisible( true );

    Not lyk this machan....
    This is the senario...
    When user press "Add new field" button a new field must be dynamically added to the current form. This is little bit complex. Have to mplement in JFrame form. Not in applet. If u can help me.
     

    akhilapraveen

    Active member
  • Jun 2, 2008
    335
    72
    28
    Not lyk this machan....
    This is the senario...
    When user press "Add new field" button a new field must be dynamically added to the current form. This is little bit complex. Have to mplement in JFrame form. Not in applet. If u can help me.

    this not complex at all machan

    heres the codin,

    (im doing with t with a button, and button is on ma jframe)

    this is tha main class(compile this)
    //------------------------------------------------------------------------
    public class JavaApplication12 {

    /**
    * @param args the command line arguments
    */
    public static void main(String[] args) {

    NewJFrame nw=new NewJFrame();


    nw.setVisible(true);
    // TODO code application logic here
    }
    }

    //--------------------------------------------------------------------


    Now i have implemented 2 buttons in ma jframe

    one button is used to hide the jtextfield and from other button you can view it

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
    NewJFrame.jTextField1.setVisible(false);
    // TODO add your handling code here:
    }



    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

    try{
    jTextField1.setVisible(true);
    }
    catch (Exception e){

    }
    // TODO add your handling code here:
    }


    this is tha basic idea of your software. Now you can edit it lik this

    add a panel to tha jframe and add jtextfield and button on to that

    goto panels customized code(write click on t and select customize code)

    and add jbutton 2s coding there

    now when you compile your main program jframe comesup!
    but not the textfield coz its visibility is off via tha panel.
    so only when user clicks on the button its visibilty is on.


    HOPE YOU GT THA IDEA!
    IF U STILL CANT GET IT POST HERE ILL SEND YOU MA APPLICATION FOLDER