DESKTOP API - Java Codes

Addition of two Numbers

Description This is a Code which Sums up two Numbers whose values we have to choose from given set of Numbers we are provided with. Source Code import java.applet.Applet; import java.awt.Button; import ...

0 Comments. 1129 views since Aug 26, 2008

Read Data From Text File

Description Give your text file path by replacing "C:/Users/praveen/Desktop/hello.txt" in the given code and code will facilitate you to read any text file having extension ".txt" . Source Code /* ...

0 Comments. 1111 views since Mar 16, 2009

Action Listener

Description This is a simple java program showing the use of ActionListener method of event classusing a simple example of copy paste Source Code /* A simple program in java showing the use of ActionList ...

0 Comments. 1031 views since Aug 2, 2008

Send Email

Description This is a code in Java to send out email with your System's Default Settings. Source Code import java.awt.Desktop; import java.net.URI; public class SendEmail { public static void main ...

1 Comments. 1025 views since Aug 3, 2008

Print the File

Description This is a simple code in Java to print a file using the default printer in your Computer System. Source Code import java.awt.Desktop; import java.io.File; import java.io.IOException; publi ...

0 Comments. 977 views since Aug 3, 2008

Launch a URL

Description This is a code to show the use of Desktop class to lauch a URL with default browser. Source Code import java.awt.Desktop; import java.io.IOException; import java.net.*; public class ...

0 Comments. 975 views since Aug 3, 2008

Searching Google from your application

Description By using this code sample you can search the any string by Google search engine with in your application. Please remember this code is work only on "Windows" plateform because it uses the "Intenet Explorer" for ...

0 Comments. 942 views since Jul 9, 2008

Open an Office Word Document

Description This is a simple code in Java to open your "OFFICE WORD DOCUMENT". Source Code import java.awt.Desktop; import java.io.File; import java.io.IOException; public class OpenWordDocument ...

1 Comments. 839 views since Aug 3, 2008