Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

Java Applets used for send sms

Thu Oct 23, 2008 1:12 am

Dear Members i want to introduce you the world of Java Language Magics
which you can use to send Text Messages to Mobile Phone Networks by sir
zahid our respectd teacher at islamia university of Bahawalpur.

Java language supports interavtive construction of webpages via Applets
modules that can be embeded in webpages . Java provides a vast variety
of predefined classes structured for applets to be works wonder.

Now a days,when cell phones and PDA's are abundant in use applets got
more importance. Some researchers also thinks that with the new creation
of softwares like Flash and Firefox there is no need for applets at all.
but they only provide runtime Animation to your files or improve the
readability and styles for outlook.

PLz note that cell phones uses HTTP protocol for sending info in/out
from WAP browsers.So it really works if have skill to utilize HTTP
request and response objects.I practically use it in
http://sms.pakistan.sc <http://sms.pakistan.sc>
Providing actuall interactivity to users via wan netwroks or internet
still requires java applets .

A very Good working example of these inner modules is the use of
sending sms text messages to cell phones via web also known as web to
mail or web sms for cell phones and Pda's.


An applet consist of a java file which has been compiled using any of
its source development kit packs as jdk 1.3 or 1.4 or some other.
It is a java source code file with extension .java that has been
debugged through java virtual machine (jvm) .
This compiled file with .class extension can now be inserted into the
webpages .


Here i provide a simple java source file code which will become an
applet after compilation using jdk1.3 or jdk1.4 .
(Latest version is jdk1.5 i think have come in market) .

This is a complete class name sirzahid.java .

it has been extende or inherited by JApplet class for providing basic
function overriding and properties usage necessary for some applets to
works wonders.

//java source code for sirzahid file extension .java

public class smspakistan extends JApplet {

// overrideable method paint of JApplet class

public void paint(Graphics sms) {

sms.drawString("Sir zahid teaches you java ",25,85);
}
}

First you would compile this,after a sirzahid.class file will be
generated ,which can be used any where in webpages .
The result of this applets will only shows a string of characters of one
line "Sir zahid teaches you java" that we passed to function drawString
(S is capital) .

This applet can be viewed in java applet viewer which comes alongwith
the package you purchased.
Note: Java is case sensitive language.You have to be very carefull using
its variable ,arrays and functions declarations .


HTML tag <applet> is used for this purpose.It has some attributes which
defines the url of the .class file and the width and height of the
applets ,how it looks like and occupy space the resulting webpage.

Here is a simple webpage sirzahid.html which will use this applet.

Code:
<html>
<head>

<title>Java Applets are taught by sirzahid in islamia university</title>

</head>
<body>
<hr><hr>
<h1> All you need to install jdk1.4 or later and a browser to see
result of your applet</h1>

<applet code="sirzahid.class" width=400 height=500 >
</applet>
</hr></hr>
</body>
</html>




Re: Java Applets used for send sms

Thu Mar 26, 2009 1:59 pm

Sir ZAHID ge where is da source code?

Re: Java Applets used for send sms

Mon Apr 20, 2009 1:41 pm

really good article, thanks for the post

Post a reply
  Related Posts  to : Java Applets used for send sms
 How to use Java Applets in your HTML     -  
 sending sms using java code and bluetoth device pls send the     -  
 What is the terms applets and servlets mean?     -  
 How to connect database with Applets     -  
 Link send     -  
 send mail using php     -  
 Send email in asp     -  
 how to send mail with Ant     -  
 Send an email in asp.net     -  
 send mail cc and bcc in php     -