Sep

18

//Applet with Arc

import java.applet.*;
import java.awt.*;
/*
<Applet code=”Ap6.class” width=”400″ height=”400″></applet>
*/
public class Ap6 extends Applet{
public void init(){
setBackground(Color.red);
setForeground(Color.yellow);
}
public void paint(Graphics g){
g.fillArc(130,110,140,140,0,-180);
}
}

//Applet with Animation-1

import java.applet.*;
import java.awt.*;
/*
<Applet code=”Ap7.class” width=”400″ height=”400″></applet>
*/
public class Ap7 extends Applet{
public void init(){
setBackground(Color.red);
setForeground(Color.yellow);
}
public void paint(Graphics g){
for(int i=0;i<=310;i+=10){
repaint();
g.fillOval(i,20,90,90);
try{
Thread.sleep(1000);
}catch(InterruptedException e){
}
}
}
}

//Applet with Animation-2

import java.applet.*;
import java.awt.*;
/*
<Applet code=”Ap8.class” width=”400″ height=”400″></applet>
*/
public class Ap8 extends Applet{
public void init(){
setBackground(Color.red);
setForeground(Color.yellow);
}
int x=0;
int y=20;
public void paint(Graphics g){
if(x<=310){
x=x+5;
}else{
y=y+5;
}
g.fillOval(x,y,90,90);
try{
Thread.sleep(100);
}catch(InterruptedException e){
}
repaint();
}
}

//Applet with Mouse Event-1

import java.applet.*;
import java.awt.*;
import java.awt.event.*;
/*
<Applet code=”Ap9.class” width=”400″ height=”400″></applet>
*/
public class Ap9 extends Applet implements MouseListener{
public void init(){
addMouseListener(this);
}
public void mouseExited(MouseEvent e){
System.out.println(“mouseExited”);
}
public void mouseEntered(MouseEvent e){
System.out.println(“mouseEntered”);
}
public void mouseReleased(MouseEvent e){
System.out.println(“mouseReleased”);
}
public void mousePressed(MouseEvent e){
System.out.println(“mousePressed”);
}
public void mouseClicked(MouseEvent e){
System.out.println(“mouseClicked”);
}
public void paint(Graphics g){
}
}

//Applet with Mouse Event-2

import java.applet.*;
import java.awt.*;
import java.awt.event.*;
/*
<Applet code=”Ap10.class” width=”400″ height=”400″></applet>
*/
public class Ap10 extends Applet implements MouseListener{
public void init(){
addMouseListener(this);
}
public void mouseExited(MouseEvent e){
}
public void mouseEntered(MouseEvent e){
}
public void mouseReleased(MouseEvent e){
}
int x,y;
public void mousePressed(MouseEvent e){
x=e.getX();
y=e.getY();
showStatus(x+”,”+y);
repaint();
}
public void mouseClicked(MouseEvent e){
}
public void paint(Graphics g){
g.drawString(x+” , “+y,x,y);
}
}

Sep

15

//:APPLET LIFE CYCLE EXAMPLE:

import java.applet.*;
import java.awt.*;
/*
<Applet code=”Ap.class” width=”300″ height=”300″></applet>
*/
public class Ap extends Applet{
public void init(){
System.out.println(“init() called”);
}
public void start(){
System.out.println(“start() called”);
}
public void paint(Graphics g){
System.out.println(“paint() called”);
}
public void stop(){
System.out.println(“stop() called”);
}
public void destroy(){
System.out.println(“destroy() called”);
}
}

//:APPLET CODE-1:

import java.applet.*;
import java.awt.*;
/*
<Applet code=”Ap2.class” width=”300″ height=”300″></applet>
*/
public class Ap2 extends Applet{
public void init(){
//setBackground(Color.red);
setBackground(new Color(100,255,0));
}
public void paint(Graphics g){
g.drawString(“HELLO”,100,100);
g.drawLine(50,50,200,200);
}
}

//:APPLET CODE-2:

import java.applet.*;
import java.awt.*;
/*
<Applet code=”Ap3.class” width=”300″ height=”300″></applet>
*/
public class Ap3 extends Applet{
public void init(){
//setBackground(Color.red);
setBackground(new Color(100,255,0));
}
public void paint(Graphics g){
g.drawRect(50,50,100,200);
g.fillRect(100,100,50,50);
g.drawOval(150,150,200,200);
g.fillOval(200,100,150,50);
}
}

//:APPLET FACE OUTLINE CODE-3:

import java.applet.*;
import java.awt.*;
/*
<Applet code=”Ap4.class” width=”400″ height=”400″></applet>
*/
public class Ap4 extends Applet{
public void init(){
setBackground(Color.red);
setForeground(Color.yellow);
}
public void paint(Graphics g){
g.drawOval(20,20,350,350);
g.drawOval(90,120,40,40);
g.drawOval(240,120,40,40);
g.drawOval(170,150,40,140);
g.drawOval(130,310,140,40);
}
}

//:APPLET FILLED FACE CODE-4:

import java.applet.*;
import java.awt.*;
/*
<Applet code=”Ap5.class” width=”400″ height=”400″></applet>
*/
public class Ap5 extends Applet{
public void init(){
setBackground(Color.red);
setForeground(Color.yellow);
}
public void paint(Graphics g){
g.setColor(Color.white);
g.fillOval(20,20,350,350);
g.setColor(Color.black);
g.fillOval(90,120,40,40);
g.setColor(Color.blue);
g.fillOval(240,120,40,40);
g.setColor(Color.red);
g.fillOval(170,150,40,140);
g.setColor(Color.green);
g.fillOval(130,310,140,40);
}
}

Sep

09

class TestEx{
public static void main(String args[]){
try{
if(args.length==0){
String s=null;
System.out.println(s.length());
}
System.out.println(args[0].length());//3
int num1=Integer.parseInt(args[0]);
int num2=Integer.parseInt(args[1]);
System.out.println(num1/num2);
}
catch(NullPointerException e){
System.out.println(e);
}
catch(ArrayIndexOutOfBoundsException e){
System.out.println(e);
}
catch(ArithmeticException e){
System.out.println(e);
}
catch(NumberFormatException e){
System.out.println(e);
}
catch(Exception e){
System.out.println(e);
}
System.out.println(“exit from main”);
}
}

Sep

09

// CHANGE THE SEQUENCE FINALLY THEN OBSERVE THE RESULT 

class TestEx{
public static void main(String args[]){
try{
if(args.length==0){
String s=null;
System.out.println(s.length());
}
System.out.println(args[0].length());//3
int num1=Integer.parseInt(args[0]);
int num2=Integer.parseInt(args[1]);
System.out.println(num1/num2);
}
catch(Exception e){
System.out.println(e);
}
finally{
System.out.println(“finally executed”);
}
System.out.println(“exit from main”);
}
}

Sep

09

class MyEx extends Exception{
MyEx(String s){
super(s);
//System.out.println(s);
}
}
class TestMyEx{
public static void main(String args[]){
int i=10;
if(i==10){
try{
throw new MyEx(“MY Exception is raised”);
}
catch(MyEx e){
System.out.println(e);
}
}
System.out.println(i);
}
}

Apr

08

JSP SAMPLE CODES DOWNLOAD

 

Jun

12

Software Developer Trainee

Eligibility : BE/B.Tech(CSE, IT), MCA

Location : Lucknow

Job Category : IT/Software, Walkin

Last Date : 16 Jun 2013

Job Type : Full Time

 

Hiring Process : Walk – In, Written-test, Face to Face Interview
Job Details

Eligibility Criteria :

Students from 2013 B.E/ B.Tech – (CS/IT)/ BCA/ MCA batch (if you are able to join instantly)

 

Job Responsibility :

This position is about creating web applications.
Working on products that are built on the SaaS model.
Exposure to Waterfall and Agile development methodologies.
Working on Open Source Products that are the largest Php/Mysql implementations in the world.
Will get the opportunity to do the mobile application development (Android as well as Iphone application)

 

Desired Profile :

Excellent problem solving and programming skills.
Very Good Technical skills.

Salary : INR 7000 per month on training period , After that INR 1.8 to 2.4 Lacs P.A

 

Job Location : Lucknow

Note : Selected candidates will have to sign a service agreement for one year. Results will be announced on Sunday (16th June 2013). Immediate Joining.

 

How to apply

Walk-in at the below mentioned venue on 15th & 16th June 2013 from 11AM to 4PM .

 

Venue :
CEDCOSS Technologies Private Limited
1/14 F Vishvash Khand Gomti Nagar , Lucknow
Uttar Pradesh -226010

 

Company Profile

CEDCOSS is a leading global Open Source software development company. We are dedicated to providing solutions to businesses by leveraging the power of open source software, solutions and technologies.

The Company has been promoted by highly experienced professionals dedicated to provide high quality IT solutions. We provide values to the product with applied quality process. We define, design and deliver IT solutions to our clients which help them to become front runner up in there domain. With CEDCOSS, clients are assured of a transparent business partner, world-class processes, speed of execution and the power to stretch their IT budget by leveraging the global delivery model that CEDCOSS pioneered.

We have severed more than 50 clients all over the globe(UK, Germany, Switzerland, USA) .

 

Jan

17

Welcome to Ram Gopal Gupta Blog, to share our knowledge..