Laman Utama Tanya Wiki English Artikel Komuniti E-Mel Ringtones Search

Bantuan | Carian | Ahli | Kalendar

Google

Selamat Datang ( Log In | Daftar )

 
Reply to this topicStart new topic
Tulun Aku Jap..
nazainurin
post Apr 30 2008, 03:57 PM
Kiriman #1


Ahli
***

Grup: Members
Kiriman: 209
Penyertaan: 14-February 08
Dari: kuantan
Ahli ke- 42,759



korang blet tulun x..?
camana nak buat button send tu bley send ape aku tulis kat email..?
plz adjust coding tu..
urgent nie...

QUOTE
import javax.swing.*;
import java.awt.*;

public class WriteMail extends JFrame {

public WriteMail() {
super("registration Subjects");
setSize(370, 270);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
FlowLayout flow = new FlowLayout(FlowLayout.RIGHT);
setLayout(flow);

JPanel row1 = new JPanel();
JLabel toLabel = new JLabel("To:");
row1.add(toLabel);
JTextField to = new JTextField(24);
row1.add(to);
add(row1);

JPanel row2 = new JPanel();
JLabel subjectLabel = new JLabel("Subject:");
row2.add(subjectLabel);
JTextField subject = new JTextField(24);
row2.add(subject);
add(row2);

JPanel row3 = new JPanel();
JLabel messageLabel = new JLabel("Message:");
row3.add(messageLabel);
JTextArea message = new JTextArea(4, 22);
message.setLineWrap(true);
message.setWrapStyleWord(true);
JScrollPane scroll = new JScrollPane(message,
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
row3.add(scroll);
add(row3);

JPanel row4 = new JPanel();
JButton send = new JButton("Send");
row4.add(send);
add(row4);

setVisible(true);
}

public static void main(String[] arguments){
WriteMail mail = new WriteMail();
}
}


--------------------
BISNES YANG MENGUNTUNGKAN. HANYA BERMODALKAN RM5 SAHAJA.
LAYARI --> http://rm5je.com/?ref=3380
Go to the top of the page
 
+Quote Post
bakteria
post Apr 30 2008, 06:09 PM
Kiriman #2


Ahli
*

Grup: Members
Kiriman: 47
Penyertaan: 23-December 04
Ahli ke- 4,670



mmm mmg la tk berfungsi lg koding ni sbb ko tk suruh button send tu wt pape pn...skrg ni ko cuma wt gui die je...dn mmg tkde pape tindakan...

ni ko refer ni jap...baca tau...

http://www.javacommerce.com/displaypage.js...ql&id=18274
Go to the top of the page
 
+Quote Post
MatchMaker
post Apr 30 2008, 06:29 PM
Kiriman #3


Ahli
***

Grup: Members
Kiriman: 467
Penyertaan: 22-May 04
Dari: Shah Alam
Ahli ke- 679



kalau takde API tu, gi download.
http://java.sun.com/products/javamail/downloads/index.html


--------------------
Sony PSP Slim and Lite PSP-2006 PB
3.71 M33-2 > 3.71 M33-4 > 3.80 M33 > 3.80 M33-2 > 3.80 M33-3 > 3.80 M33-4 > 3.80 M33-5 > 3.90 M33-3
+ 3.80 M33 Popsloader
Canon Ixus 75
Compaq Presario V3751AU
Go to the top of the page
 
+Quote Post
nazainurin
post May 1 2008, 09:26 AM
Kiriman #4


Ahli
***

Grup: Members
Kiriman: 209
Penyertaan: 14-February 08
Dari: kuantan
Ahli ke- 42,759



aku xpaham la bro..
koding tu nak letak kat mana?


--------------------
BISNES YANG MENGUNTUNGKAN. HANYA BERMODALKAN RM5 SAHAJA.
LAYARI --> http://rm5je.com/?ref=3380
Go to the top of the page
 
+Quote Post
unexistance
post May 1 2008, 11:20 AM
Kiriman #5


Ahli Rajin
*****

Grup: Members
Kiriman: 1,106
Penyertaan: 29-March 06
Dari: 46350
Ahli ke- 15,794



g: java mail example

dapat:
http://www.javaworld.com/javaworld/jw-06-1...6-javamail.html
http://exampledepot.com/egs/javax.mail/SendApp.html

yang penting, ko kena ada mail server (smtp.contoh.com / mail.contoh.com)..


--------------------
mint4(ubuntu7(debian(GNU/Linux2.6))) + XP-SP2@compaq_presario_v3010au
vista-home-basic + fc9(GNU/Linux2.6)@dell_inspiron_530s
Go to the top of the page
 
+Quote Post
nazainurin
post May 1 2008, 07:10 PM
Kiriman #6


Ahli
***

Grup: Members
Kiriman: 209
Penyertaan: 14-February 08
Dari: kuantan
Ahli ke- 42,759



QUOTE(unexistance @ May 1 2008, 11:28 AM) *

mail server tu nak letak kat mana..?
sori..aku mmg xtau nih..


--------------------
BISNES YANG MENGUNTUNGKAN. HANYA BERMODALKAN RM5 SAHAJA.
LAYARI --> http://rm5je.com/?ref=3380
Go to the top of the page
 
+Quote Post
Firestarter
post May 1 2008, 08:02 PM
Kiriman #7


Ahli Rajin
****

Grup: Members
Kiriman: 731
Penyertaan: 2-December 06
Dari: Paka ke Dungun
Ahli ke- 21,529



Ko kena letak action listener kat button send tu. Java mail tu buat 1 class. Letak kat actionListener. Ko kena tau mail server pe yang ko nk send pe yang ko dah tulis dalam kotak gui ko tu. Kalo tak tau mail ape, memang tak sampai ape yang ko nak send tu.

ActionListener

Kiriman ini telah diubahsuai oleh Firestarter: May 1 2008, 08:04 PM


--------------------
Java Specialist Programmer
programming+bisnes logic=headche
Go to the top of the page
 
+Quote Post
nazainurin
post May 1 2008, 09:45 PM
Kiriman #8


Ahli
***

Grup: Members
Kiriman: 209
Penyertaan: 14-February 08
Dari: kuantan
Ahli ke- 42,759



QUOTE(unexistance @ May 1 2008, 11:28 AM) *

bro...
java email example tu, nak save kat dlm folder bin jdk atau jre..?


QUOTE(MatchMaker @ Apr 30 2008, 06:37 PM) *

aku dah download API tu tp xreti nak simpan kat mana...


--------------------
BISNES YANG MENGUNTUNGKAN. HANYA BERMODALKAN RM5 SAHAJA.
LAYARI --> http://rm5je.com/?ref=3380
Go to the top of the page
 
+Quote Post
MatchMaker
post May 2 2008, 10:09 AM
Kiriman #9


Ahli
***

Grup: Members
Kiriman: 467
Penyertaan: 22-May 04
Dari: Shah Alam
Ahli ke- 679



http://java.sun.com/products/javamail/FAQ.html#install
kat dalam zip tu ada dia nyer readme.txt

or

edit:
ok nak tambah sikit ni. bila ko unzip copy and letak mail.jar tu kat ko nyer JDK.
\jdk1.X.X\jre\lib\ext ni path dia, letak dalam folder ext.

Kiriman ini telah diubahsuai oleh MatchMaker: May 2 2008, 11:27 AM


--------------------
Sony PSP Slim and Lite PSP-2006 PB
3.71 M33-2 > 3.71 M33-4 > 3.80 M33 > 3.80 M33-2 > 3.80 M33-3 > 3.80 M33-4 > 3.80 M33-5 > 3.90 M33-3
+ 3.80 M33 Popsloader
Canon Ixus 75
Compaq Presario V3751AU
Go to the top of the page
 
+Quote Post
unexistance
post May 2 2008, 10:35 AM
Kiriman #10


Ahli Rajin
*****

Grup: Members
Kiriman: 1,106
Penyertaan: 29-March 06
Dari: 46350
Ahli ke- 15,794



ok, skang ni ko keje atau student lagi? kalau keje, biasa company ko da siap2 ada mail server da..

kalau ko blaja lagi, boleh try pakai yang free nye


--------------------
mint4(ubuntu7(debian(GNU/Linux2.6))) + XP-SP2@compaq_presario_v3010au
vista-home-basic + fc9(GNU/Linux2.6)@dell_inspiron_530s
Go to the top of the page
 
+Quote Post
bakteria
post May 2 2008, 07:16 PM
Kiriman #11


Ahli
*

Grup: Members
Kiriman: 47
Penyertaan: 23-December 04
Ahli ke- 4,670



mm aku rasa die tk phm lg tu psl coding tu nk ltk mn...cmne ngan mailserver lg...mmm

Kiriman ini telah diubahsuai oleh bakteria: May 2 2008, 07:19 PM
Go to the top of the page
 
+Quote Post
nazainurin
post May 2 2008, 07:41 PM
Kiriman #12


Ahli
***

Grup: Members
Kiriman: 209
Penyertaan: 14-February 08
Dari: kuantan
Ahli ke- 42,759



sori korang..
aku student lagi..
aku mmg xpaham pun..
aku blaja cuma dpt table, pastu buat coding..
tup tup..kena buat projek guna GUI..
giler btol..
tq sbb membantu...
syg kat korang..
hidup PUTERA..!!


--------------------
BISNES YANG MENGUNTUNGKAN. HANYA BERMODALKAN RM5 SAHAJA.
LAYARI --> http://rm5je.com/?ref=3380
Go to the top of the page
 
+Quote Post
unexistance
post May 3 2008, 08:25 AM
Kiriman #13


Ahli Rajin
*****

Grup: Members
Kiriman: 1,106
Penyertaan: 29-March 06
Dari: 46350
Ahli ke- 15,794



ko bleh try relate post2 + link aku bagi tu happy.gif


--------------------
mint4(ubuntu7(debian(GNU/Linux2.6))) + XP-SP2@compaq_presario_v3010au
vista-home-basic + fc9(GNU/Linux2.6)@dell_inspiron_530s
Go to the top of the page
 
+Quote Post
bakteria
post May 3 2008, 01:37 PM
Kiriman #14


Ahli
*

Grup: Members
Kiriman: 47
Penyertaan: 23-December 04
Ahli ke- 4,670



ni contoh cmne nk masukkn koding tu dalam button ko...

CODE
leftButton = new JButton( "OK" );
container.add( leftButton );
leftButton.addActionListener(

new ActionListener(){
public void actionPerformed( ActionEvent event )
{
<buat la apa ko nk kt cni>
layout.layoutContainer( container );
}
}
);


ok nmpk tk?
Go to the top of the page
 
+Quote Post
nazainurin
post May 3 2008, 04:02 PM
Kiriman #15


Ahli
***

Grup: Members
Kiriman: 209
Penyertaan: 14-February 08
Dari: kuantan
Ahli ke- 42,759



QUOTE(bakteria @ May 3 2008, 01:45 PM) *
ni contoh cmne nk masukkn koding tu dalam button ko...

CODE
leftButton = new JButton( "OK" );
container.add( leftButton );
leftButton.addActionListener(

new ActionListener(){
public void actionPerformed( ActionEvent event )
{
<buat la apa ko nk kt cni>
layout.layoutContainer( container );
}
}
);


ok nmpk tk?

jap..
klik button kat netbeans tu,k pastu paste coding nie ker..?
yg nie plak ape --> "buat la apa ko nk kt cni".. bley bagi contoh..?


--------------------
BISNES YANG MENGUNTUNGKAN. HANYA BERMODALKAN RM5 SAHAJA.
LAYARI --> http://rm5je.com/?ref=3380
Go to the top of the page
 
+Quote Post
Firestarter
post May 4 2008, 10:52 AM
Kiriman #16


Ahli Rajin
****

Grup: Members
Kiriman: 731
Penyertaan: 2-December 06
Dari: Paka ke Dungun
Ahli ke- 21,529



Ko tak buat rujukan mana2 web ke? Ada tak ko pegi kat sun punya site tu? Pilih API dokumentasi. Situ banyak bagitau tutorial.

Tempat <buat la apa ko nk kt cni> tu, ko nak panggil class yang ko buat mail tadi(tak tau la ko paham ke tak). Bila ko dah panggil baru la button tu buleh berfungsi dengan betol.

Nanti aku bagi PM kat ko..Pasal Java ni..Banyak yang ko nak kena tau walaupun ko buat projek kecil je.


--------------------
Java Specialist Programmer
programming+bisnes logic=headche
Go to the top of the page
 
+Quote Post
nazainurin
post May 4 2008, 04:09 PM
Kiriman #17


Ahli
***

Grup: Members
Kiriman: 209
Penyertaan: 14-February 08
Dari: kuantan
Ahli ke- 42,759



QUOTE
import java.io.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;

public class SendApp {
public static void send(String smtpHost, int smtpPort,
String from, String to,
String subject, String content)
throws AddressException, MessagingException {
// Create a mail session
java.util.Properties props = new java.util.Properties();
props.put("mail.smtp.host", smtpHost);
props.put("mail.smtp.port", ""+smtpPort);
Session session = Session.getDefaultInstance(props, null);

// Construct the message
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
msg.setSubject(subject);
msg.setText(content);

// Send the message
Transport.send(msg);
}

public static void main(String[] args) throws Exception {
// Send a test message
send("hostname", 25, "joe@smith.com", "sue@smith.com",
"re: dinner", "How about at 7?");
}
}

aku guna netbeans, ade prob kat
QUOTE
import javax.activation.*;

public class SendApp {

so camana ek..
cpt2..dah nazak sgt nih..



--------------------
BISNES YANG MENGUNTUNGKAN. HANYA BERMODALKAN RM5 SAHAJA.
LAYARI --> http://rm5je.com/?ref=3380
Go to the top of the page
 
+Quote Post
bakteria
post May 4 2008, 04:22 PM
Kiriman #18


Ahli
*

Grup: Members
Kiriman: 47
Penyertaan: 23-December 04
Ahli ke- 4,670



mmm dia bg error kt import javax.activation.*; ke? patut netbeans leh recognize package tu...

nah ko refer link ni...

http://www.chinaitpower.com/source/ant1.6....ailer.java.html
Go to the top of the page
 
+Quote Post
nazainurin
post May 5 2008, 04:59 PM
Kiriman #19


Ahli
***

Grup: Members
Kiriman: 209
Penyertaan: 14-February 08
Dari: kuantan
Ahli ke- 42,759



tq korang sbb sudi membantu..
aku berjaya wat sistem yg cikai dengaan hasil bantuan korang..
kejayaan nie bkn untuk aku jer, tp untuk korang yg berjaya ajar aku..
tq byk2...
muah..muah..muah..


--------------------
BISNES YANG MENGUNTUNGKAN. HANYA BERMODALKAN RM5 SAHAJA.
LAYARI --> http://rm5je.com/?ref=3380
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 

RSS Lo-Fi Version Time is now: 12th October 2008 - 12:26 PM

© 1998-2008 Khazanah Maya Computer Systems