CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

View: 2147|Reply: 9

kod java utk masukkan gmbr

[Copy link]
Post time 14-8-2007 03:13 AM | Show all posts |Read mode
cane ehh nak masukkan image gune kod java??sapa tau?plss..


Reply

Use magic Report


ADVERTISEMENT


Post time 14-8-2007 10:02 AM | Show all posts
JLabel l1;
Icon img=new ImageIcon("your_image.gif" );
l1=new JLabel(img);

ko nak yg mcm ni ke
Reply

Use magic Report

 Author| Post time 14-8-2007 10:14 AM | Show all posts
nnti aku try,,
thanks..
Reply

Use magic Report

 Author| Post time 14-8-2007 10:23 AM | Show all posts
huhu..
xdpt laa plak..
your_image.gif tu nama file ke?
Reply

Use magic Report

Post time 14-8-2007 01:08 PM | Show all posts

Reply #4 kupu2siang's post

pastikan letak dalam satu folder yg sama.

baru ko run program...
Reply

Use magic Report

 Author| Post time 14-8-2007 07:14 PM | Show all posts
dah dpt dah..
tenkiu..

er...kalao nak tukar size button cane lak ehh..
Reply

Use magic Report

Follow Us
Post time 14-8-2007 08:04 PM | Show all posts

Reply #6 kupu2siang's post

JButton demo;
demo=new JButton(" orang_letrik" );
demo.setBounds(x1,y1,x2,y2);

kalo ko guna applet...guna macam biasa je

kalo ko guna frame...initialize JButton kat luar frame. tp ikut ko la.

mana yg ko suka...hehe
Reply

Use magic Report

 Author| Post time 14-8-2007 10:16 PM | Show all posts
leh terangkan x x1, y1 tu?
Reply

Use magic Report


ADVERTISEMENT


Post time 15-8-2007 02:20 AM | Show all posts

Reply #8 kupu2siang's post

x1--------------------------x2
|                                     |
|                                     |
|                                     |
y1--------------------------y2

contoh kat atas yang aku buat secara manual ni ko akan paham.

ala... x1,y1... semua tu melambangkan koordinat.

makin besar ko bagi nilai...semakin besar jugak la button yg akan ko dapat.

[ Last edited by  orang_letrik at 15-8-2007 02:22 AM ]
Reply

Use magic Report

 Author| Post time 16-8-2007 09:45 AM | Show all posts
ow..ok..tenkiu org letrik..
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT



 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

3-1-2025 01:16 AM GMT+8 , Processed in 0.657775 second(s), 23 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list