Sanam Kumar

Greenhorn
+ Follow
since Jun 04, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sanam Kumar

I have a Vector itemDetails to which an object UsageItem usageitem is added.
itemDetails.add(usageitem);
I want to remove an object from vector (itemDetails) based on the condition that if "key" is already present in the vector, then the particular object should be removed from th vector.

I dont know how to remove this element from the Vector. Please help.

13 years ago
Hello,

I am stuck up with a problem, can anyone please tell me how do i pass a value from a JSP page
to a JApplet,
and the parameter passed through JSP should be displaed in the JTextArea.

It would be kindful if any of you could help.

Thanks
Sanam
[ March 17, 2005: Message edited by: Bear Bibeault ]
15 years ago
Hello,


How can i pass a value that is entered in a JTextArea in a JApplet and fetch the entered value from JTextArea and display it in a JSP page.

It would be kindful if someone could help me with this problem.

Regards
Sanam
15 years ago
JSP
Hello,

I am badly in need of help and it is very urgent.
can someone ppleaseeeeeeeeeeee help

I want to store the result of a resultset in a array,

Eg : i have table tblannotation , n have 3 records with id = 1

and i want to put the result in an array, how can i do that

i.e i want
annoTextArray[1] = "aaaa";
annoTextArray[2] = "bbb";
annoTextArray[3] = "aaaa";

how do i put result of a resultset in an array

pleaseeeeeeeeeeeeee help;

Thanks
Sanam


Class.forName("org.postgresql.Driver");
url1 = "jdbc ostgresql://192.161.0.0:3333/emo";
con1 = DriverManager.getConnection(url1,"an","jwqek");
stmt1 = con1.createStatement();

sql1 = "select * from tblannotation where id =1";

ResultSet rs1 = stmt1.executeQuery(sql1);
rs1.last();
int rowCount = rs1.getRow();
System.out.println("Row Count : " +rowCount);

while(rs1.next())
{
String[] anoTxt = rs1.getString("annotationtext");
//System.out.println(anoTxt1);
annoTextArray = anoTxt1;
}
[ March 03, 2005: Message edited by: Bear Bibeault ]
hello,

How do i fetch an image that is stored as
Blob in the database and store the image in a file

or


display the same image in an applet.

it would be kindlul if anyone could help me with this.

Regards
Sanam
15 years ago
Hello,


Can any one please tell me how can i display
a BufferedImage in a JApplet.

Regards
Sanam
15 years ago
Hello,

Please some one help with this,
actually what i m tryin to do is, when i mouse click n drag the mouse n release it , i want a rectangle to be drawn.

and when i click on another location then also i want a rectangle to be drawn and the previusly drawn rectangle should also be vissible.

I am able to draw the rectangle but whe i draw a new rectangle the old rectangle vanishes.

i should be able to draw any number of rectangles, and all the rectangle
should be vissible.

can any one plz help me with this.

Plz help

Regards
Sanam

import java.awt.*;
import java.applet.*;
import java.awt.event.*;


/*
<applet code = "Test.class" width = 1020 height = 600>
</applet>
*/
public class Test extends Applet implements MouseListener
{
private Color color = Color.black;
int x1, y1, x2, y2 = 0;
int width, height = 0;
int startX, startY = 0;
boolean drawObject = false;
boolean moveObject = false;
Rectangle myRectangle = new Rectangle(startX,startY,width,height);

public void init()
{
setBackground(Color.gray);
addMouseListener(this);
int i = 5;
}


public void paint(Graphics g)
{
//recover Graphics2D
Graphics2D g2 = (Graphics2D)g;
g2.setColor(color);
if(drawObject)
{
//create Rectangle Object
myRectangle = new Rectangle(startX,startY,width,height);
}
else if (moveObject)
{
myRectangle.setLocation(x2,y2);
}
g2.draw(myRectangle);
}

/////////////////////////////////////////////////////
//--> Start of section dealing with Mouse Events
/////////////////////////////////////////////////////
public void mouseClicked(MouseEvent e)
{}
public void mouseEntered(MouseEvent e)
{}
public void mouseExited(MouseEvent e)
{}
public void mousePressed(MouseEvent e)
{
x1 = e.getX();
y1 = e.getY();
//Check to see if mouse is pressed in the current rectangle.
if(myRectangle.contains(x1,y1))
{
//move the object instead of moving it
drawObject = false;
moveObject = true;
}
else
{
//draw the object, don't move
drawObject = true;
moveObject = false;
}

}

public void mouseReleased(MouseEvent e)
{
//get the positions of where the mouse was released
x2 = e.getX();
y2 = e.getY();
if (x1 != x2 && y1 != y2)
{
//maths to work out where to draw the object
if(x1 < x2 && y1 < y2)
{//1
startX = x1;
startY = y1;
height = y2 - y1;
width = x2 - x1;
}
else if (x1 > x2 && y1 > y2)
{//2
startX = x2;
startY = y2;
height = y1 - y2;
width = x1 - x2;
}
else if (x1 > x2 && y1 < y2)
{//3
startX = x2;
startY = y1;
height = y2 - y1;
width = x1 - x2;
}
else if (x1 < x2 && y1 > y2)
{//4
startX = x1;
startY = y2;
height = y1 - y2;
width = x2 - x1;
}

}
repaint();
}
}
15 years ago
Hi,

i am stuck up with a problem,

when i click on a button on the applet
and when i drag the mouse and release it a rectangle has to be drawn,
it would be kindful if anyone could help me in getting this done


Regards
Sanam
15 years ago
Hi, i am stuck up with a problem,

when i click on a button on the applet
and when i drag the mouse and release it a rectangle has to be drawn,
it would be kindful if anyone could help me in getting this done


Regards
Sanam
15 years ago