Popular Java Codes

Thread Inner Classes

Description This code shows the implementation of threads with inner classes. Source Code class InnerThread1 { private int countDown = 5; private Inner inner; private class Inner extends Thr ...

0 Comments. 8065 views since Sep 10, 2008

Simplified DES (SDES) Algorithm

Description This is a Java code for Encryption, Decryption and Key generation in Simplified DES (SDES) algorithm used in Cryptography and Network Security. Sample output: >SKT_SDES 0000011111 01000111 Key K1: 01101011 Key K2: 101 ...

8 Comments. 6221 views since Sep 23, 2008

JTree: File and Directory Tree

Description This is a sample code of JTree. By using this code you can make the Tree of Diretories and Files for Example: Windows File Explorer. Source Code import java.awt.*; import java.io.File; import ...

0 Comments. 2772 views since Aug 16, 2008

Swing and Thread for Length Operation

Description This code shows the lengthy process for searching a particular bank account's remaining balance. Source Code package yfrindia; import java.awt.BorderLayout; import java.awt.FlowLayout; ...

0 Comments. 2596 views since Sep 11, 2008

Counter with Swing & Thread

Description This code shows a circle which on pressing of start button starts filling the circle with red colour and on pressing stop, stops the activity. Source Code import java.awt.BorderLayout; impor ...

0 Comments. 2452 views since Sep 10, 2008

JComboBox: Date & Time

Description This is a Code which demonstrates how to add Listeners to a ComboBox & shows Date &/or Time according to the System Date & Timings in different formats based on the selection in the ComboBox. Source Code <pre name="code" ...

0 Comments. 2254 views since Aug 21, 2008

KBC Game

Description A java quiz application like KAUN BANEGA KAROREPATI.... Source Code import javax.swing.*; import java.awt.*; import java.awt.event.*; public class testingkbc implements Runnable ...

0 Comments. 1919 views since Jul 2, 2011

JList: Add|Remove Items

Description This is a Code which Adds or Removes the Items from a JList at runtime. Source Code import java.awt.*; import java.awt.event.*; import javax.swing.*; public class ListUpdation extends JFrame ...

0 Comments. 1768 views since Aug 19, 2008

File Chooser

Description This code shows how to select files from your pc with a file browser. Source Code import static javax.swing.JFileChooser.APPROVE_OPTION; import static javax.swing.JFileChooser.APPROVE_SELEC ...

0 Comments. 1683 views since Sep 30, 2008

Applet: Hello World

Description applet programming in java Source Code import java.applet.Applet; import java.awt.*; import java.awt.event.*; /* &lt;APPLET CODE=applet.class WIDTH=200 HEIGHT=200 &gt; &lt;/APPLET&gt; ...

0 Comments. 1645 views since May 28, 2009