Raghavendra_Singh

Greenhorn
+ Follow
since Sep 20, 2001
Merit badge: grant badges
For More
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 Raghavendra_Singh

Hi Rice,
Try this one
import java.util.Properties;
import javax.mail.*;
import javax.mail.internet.*;
public class SendMail
{
public static void main (String args[]) throws Exception
{
String host = "smtp.sharda.mahindrabt.com";
String from = "abc@xyz.com";
String to = "def@uvw.com";
Properties props = System.getProperties();
props.put("mail.smtp.host", host);
Session session = Session.getDefaultInstance(props,null);
MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
System.out.println(" setting subject and message ");
message.setSubject("hi ");
message.setText("how r u");
Transport.send(message);
System.out.println(" sent the message ");
System.out.println(" thanks ");
}
}
22 years ago
hi all,
I have a panel made in swings.It contains certain buttons , on click of which certain actions(backend processing takes place)are triggered (one row is updated in the database at one click).
Now since my catalog which has to be UPDATED contain thousands or records , each time pressing a button THROUGH MOUSE is obviously very taxing.
In order to do away with it I have added a Keylistener to the button and now on pressing a key on keyboard say "control"(essentially triggers the same events as triggered by clicking the button with mouse)I get what I want.
But for that the button has to be brought into focus to using tab.
CAN U SUGGEST SOME METHOD SO THAT I CAN COMPLETELY DO AWAY WITH THE BUTTON AND CAN PERFORM THE SAME OPERATIONS ON PRESS OF A KEY ON KEYBOARD.
22 years ago