Java Tutorial

 
 
 
 
/* <applet code=\"concat2Str\" height=150 width=350>
   </applet> */

import java.awt.*;
import java.applet.*;

public class concat2Str extends Applet
{
       TextField Ts1,Ts2;

       public void init(){
            Ts1 = new TextField(10);
            Ts2 = new TextField(10);
            add(Ts1);
            add(Ts2);
            Ts1.setText(\"\");
            Ts2.setText(\"\");
        }

        public void paint(Graphics g){
            String str1,str2;

            g.drawString(\"Enter Two String to Concat Them \",10,50);

            str1=Ts1.getText();
            str2=Ts2.getText();
            g.setColor(Color.red);
            g.drawString(str1+\" \"+str2,10,70);
            showStatus(\"Concatination of 2 String\");
     }

     public boolean action(Event e, Object o){
           repaint();
           return true;
    }

}

    Related Post:
  1. Develop a CORBA based application for addition of two complex numbers and displaying the result on client side

  2. Socket program of multi client chat server

  3. Program that maintains employee database of an education system

  4. Program of concatenating and Buffering files

  5. Program to Display Output in triangular shape

  6. Program to show the use of Do-While Loop

  7. Program to show the use of Increment and Decrement Operators

  8. Program to show the use of Switch Statement

  9. Program to compare Strings by compring successive corresponding characters, starting with the first character in each String

  10. Program to search an element in an array using Linear Search

  11. Given a list of marks ranging form 0 to 100, write a program to compute and print the number of students marks

  12. Program in CORBA which takes a long sentence from client (at least 7 words), passes to the server, server separates out each word and sends back

  13. Program to show the use of Bitwise Operator (~) Complement

  14. program which takes a long sentence from the client passes to the server,server separates out each word and sends them back to client in reverse order

  15. Develop a game application in CORBA for which the player will guess a number between 1 to 100, which will be compared to the random number generated b

  16. Program to show the use of Nested If-Else Statements

  17. Program to determine the sum of the following harmonic series for a given value of n

  18. Program to show the use of Conditional (Ternary) Operator

  19. Program to ask question and accept answer up to 3 attempt and display right answer if it is wrong

  20. RMI based application, which reads a file with list of marks of student from a client, send it to server and find how many students having distinct

 
 
Didn't find what you were looking for? Find more on An applet program that concatenates two string entered in TextField