Startertutorials Blog
Tutorials and articles related to programming, computer science, technology and others.
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.

Displaying xUbuntu in fullscreen using VMWare

Categories: Linux. No Comments on Displaying xUbuntu in fullscreen using VMWare

This article contains instructions on displaying xUbuntu in fullscreen using VMWare.   Heard about xUbuntu from colleagues and decided to try it. Downloaded the ISO file and installed it using VMWare. The user interface of xUbuntu is very simple and pleasing.   But I noticed that even when VMWare is in full screen mode, the […]

Read the rest of this entry »

Applet program to handle mouse events

Categories: Applets. No Comments on Applet program to handle mouse events

In this article we will learn to implement an Applet program to handle mouse events. A Java applet program is provided below to handle various mouse events.   Program is as follows: import java.applet.*; import java.awt.*; import java.awt.event.*; public class MouseApplet extends Applet implements MouseListener { String msg="Initial Message"; public void init() { addMouseListener(this); } […]

Read the rest of this entry »

Applet program to draw lines, ovals, and rectangles

Categories: Applets. 2 Comments on Applet program to draw lines, ovals, and rectangles

In this article we will implement an Applet program to draw a line, oval and rectangle. An Applet program is provided below to draw lines, ovals, and rectangles.   import java.applet.*; import java.awt.*; public class GApplet extends Applet { public void paint(Graphics g) { g.drawLine(20, 20, 500, 20); g.drawRect(20, 40, 200, 40); g.fillRect(300, 40, 200, […]

Read the rest of this entry »

Applet program to display file content

Categories: Applets. No Comments on Applet program to display file content

In this article we will learn to implement a Java Applet program to display file content. An Applet program is provided below that displays the content of the file whose name and extension is sample.txt.   Program is as follows: import java.applet.*; import java.awt.*; import java.io.*; public class MyApplet extends Applet { public void paint(Graphics […]

Read the rest of this entry »

Java program to display the number of characters lines and words in a text file

Categories: Files. 7 Comments on Java program to display the number of characters lines and words in a text file

In this article we will learn to implement a Java program to display the number of characters lines and words in a text file. A Java program is provided below that displays the number of characters, lines and words in a text file.   import java.io.*; class FileDemo { public static void main(String args[]) { […]

Read the rest of this entry »

Java program to display integers and sum using StringTokenizer

Categories: Strings. No Comments on Java program to display integers and sum using StringTokenizer

In this article we will learn to implement a Java program to display integers and their sum using StringTokenizer. A Java program is provided below which uses StringTokenizer class, reads a line of integers and then displays each integer and the sum of all integers.   Program is as follows: import java.util.*; class StringTokenDemo { […]

Read the rest of this entry »

Java program to demonstrate life cycle of a thread

Categories: Threads. No Comments on Java program to demonstrate life cycle of a thread

In this article we will learn to implement a Java program to demonstrate life cycle of a thread. A Java program is provided below to illustrate life cycle of a thread.   Program is as follows: import java.util.*; class ChildThread implements Runnable { Thread t; ChildThread() { t = new Thread(this); System.out.println("Thread is in new […]

Read the rest of this entry »

Java program that creates three threads

Categories: Threads. No Comments on Java program that creates three threads

In this article we will learn to implement a Java program that creates three threads. A java program is provided below to create three threads.   First thread displays “Good Morning” every one second, the second thread displays “Hello” every two seconds and the third thread displays “Welcome” every three seconds.   Program is as […]

Read the rest of this entry »