Skip to content

Instantly share code, notes, and snippets.

View theArjun's full-sized avatar

Arjun Adhikari theArjun

View GitHub Profile
@theArjun
theArjun / HelloApplet.html
Created January 23, 2019 16:18
Applet Implementation in Java
<html>
<head>
<title>Applet Demonstration</title>
</head>
<body>
<applet code="HelloApplet.class" height="400" width="400"></applet>
</body>
@theArjun
theArjun / PassingParameterToAppletUsingAppletViewer.java
Last active January 24, 2019 16:25
Passing Parameter to Applet using AppletViewer
import java.applet.*;
import java.awt.*;
// Following HTML chunk will pass parameter to Applet. This is comment for Java Compiler but not for appletviewer, so altering the attribute of parameter never compell to recompile again.
/*/
<applet code = "ParamDemo" height = "500" width = "500">
<param name = "fontName" value = "Comic Sans MS">
<param name = "fontSize" value = "40">
<param name = "leadingfontName" value = "14.80">
@theArjun
theArjun / ABOUT.md
Last active February 20, 2019 12:41
Nepali Flag using AWT Graphics in Applet

Nepali Flag

26th January 2019, Arjun Adhikari

This program is written on Java using AWT grapics in Applet. It mayn't resemble with the actual Nepali Flag and I'm sorry for this. I truly respect the effort of artists to develop this flag and I feel honored to be the citizen of this country NEPAL.

Output

Nepali Flag

@theArjun
theArjun / AUDIO.md
Last active January 28, 2019 17:17
Playing Audio in Applet

Playing Audio in Applet

28th January 2019 , 🖋 Arjun Adhikari

An applet can play an audio file represented by the AudioClip interface in the java.applet package. The AudioClip interface has three methods, including :
public void play() − Plays the audio clip one time, from the beginning.
public void loop() − Causes the audio clip to replay continually.
public void stop() − Stops playing the audio clip.
To obtain an AudioClip object, you must invoke the getAudioClip() method of the Applet class. The getAudioClip() method returns immediately, whether or not the URL resolves to an actual audio file. The audio file is not downloaded until an attempt is made to play the audio clip.

@theArjun
theArjun / Test.java
Created February 13, 2019 11:18
Implementation of SELECT Query using JDBC
package com.gces.jdbc;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class Test {
@theArjun
theArjun / ABOUT.md
Last active February 13, 2019 16:57
Input From GUI and Upload to Database

GUI

GUI

Database

Database

@theArjun
theArjun / StringFormatJDBC.java
Created February 14, 2019 07:17
INSERT Query using String Format in JDBC
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
import java.sql.SQLException;
public class StringFormat {
public static final String JDBC_DRIVER = "com.mysql.cj.jdbc.Driver";
public static final String JDB_URL = "jdbc:mysql://localhost:3306/gces";
@theArjun
theArjun / ABOUT.md
Created February 14, 2019 13:39
String Format in Insert Query using JDBC Connection

Output

output

@theArjun
theArjun / ABOUT.md
Created February 14, 2019 19:26
Server Client Communication using Sockets

Output

Client Server Communication

@theArjun
theArjun / Main.java
Last active May 19, 2019 16:38
User Input and Printing in Console
// Program to read input from console and display in console.
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
class Main
{
public static void main (String[]args) throws IOException