Article View: borland.public.jbuilder.java.api
Article #1884Re: insert an image
From: Nabin Thomas
Date: Tue, 31 Jul 2001 15:35
Date: Tue, 31 Jul 2001 15:35
140 lines
4518 bytes
4518 bytes
Override the paint method of the component where u want to put the image
to
somewhat like this
public void paint(Graphics g){
g.drawImage(image,x,y);
}
Andre Hitzschke wrote:
> Hi there,
>
> who do i insert an image into my jbuilder-application? i mean not an applet.
> i want to put an image at position (x,y).
>
> hope, somebody can help me.
>
> thx,
> andre
--
***********************************
***************************************************
******************* Web Card **********************
***************************************************
Name : Nabin Thomas
e-mail : nabinthomas@hotmail.com
Web : http://nabin.topcities.com
Feel free to contact me thru e-mail or MSN Mssenger
if required but DONOT SPAM
***************************************************
***********************************
X-Mozilla-Status: 000922:36:51 2001
X-Mozilla-Status: 0801
X-Mozilla-Status2: 00000000
FCC: /k|/Program Files/Netscape/Users/jsmith/mail/Sent
X-Mozilla-News-Host: forums.inprise.com
Message-ID: <3B65942B.B66D1418@hotmail.com>
Date: Mon, 30 Jul 2001 22:36:51 +0530
From: Nabin Thomas <nabinthomas@hotmail.com>
X-Mozilla-Draft-Info: internal/draft; vcard=0; receipt=0; uuencode=0;
html=0; linewidth=74
X-Mailer: Mozilla 4.75 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: Multicast Socket programs
References: <3B60C3BD.B31A2B7A@cesmainternational.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Russell wrote:
>
> Hi all ,
>
> I am using RedHat6.1 , jdk1.2.2 and jbuilder3.5.I need to send some
> rubbish packet from my computer to another computer .
> Below is code and my question for sending packet to the another
> computer.
>
> public static void main(String[] args) {
>
> byte [] buf = new byte[256];
> MulticastSocket socket = null;
>
> try{
>
> socket = new MulticastSocket(12345); ---> Can this be any port
> no ??
Yes, it can be
>
>
> InetAddress group = InetAddress.getByName("192.168.0.27"); -->
> What is this IP address for ?? My pc or another PC ?
This address is the address of the multicast group. That is the group of
all computers that wants to take part in this communication. The IGMP
protocol maps this address to the IP addresses of all those participate
in
the multicasting.
For more information and a good introduction on multicast
communication
with Java goto
http://java.sun.com/docs/books/tutorial/networking/datagrams/broadcasting.html
Also read the book "Using the Java 2 Platform" by Joseph weber if
possible. It contains more details on multicasting and how to do it in
java explained in a simple way.
>
>
> DatagramPacket packet = new
> DatagramPacket(buf,buf.length,group,12345);
> socket.send(packet);
>
> }
> catch(Exception e){
> e.printStackTrace();
> }
>
> socket.close();
>
> }
>
> And can i know how to check that the packet that send to another
> computer is receieved ?
>
> Thanks
--
***********************************
***************************************************
******************* Web Card **********************
***************************************************
Name : Nabin Thomas
e-mail : nabinthomas@hotmail.com
Web : http://nabin.topcities.com
Feel free to contact me thru e-mail or MSN Mssenger
if required but DONOT SPAM
***************************************************
***********************************
Technical Details
Message-ID:
<3B66D052.3545786@hotmail.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3b61f8ea_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,ae19b94a61840212 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2001-07-31 08:43:57 PST Message-ID: <3B66D052.3545786@hotmail.com> Date: Tue, 31 Jul 2001 21:05:46 +0530 From: Nabin Thomas <nabinthomas@hotmail.com> X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.api Subject: Re: insert an image References: <3b61f8ea_2@dnews> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 202.9.186.207 X-Trace: dnews 996593754 202.9.186.207 (31 Jul 2001 08:35:54 -0700) Lines: 140 Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews