Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #11809

Re: how to post to a frame outside an applet

From "John B. Matthews" <nospam@nospam.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: how to post to a frame outside an applet
Date 2012-02-07 07:00 -0500
Organization The Wasteland
Message-ID <nospam-7C1F1A.07000007022012@news.aioe.org> (permalink)
References <7582404.2642.1328331984615.JavaMail.geo-discussion-forums@yquu38>

Show all headers | View raw


In article 
<7582404.2642.1328331984615.JavaMail.geo-discussion-forums@yquu38>,
 westin075@gmail.com wrote:

> I am trying to make an instant messenger window that runs atop a 
> chatroom that many users would be in.  I'm just having problems 
> writing to the second window or frame once an I'm session is 
> initiated.  Does this involve getting the info from im1 to goto im2 
> via the server first then writing to a socket? If so, once the IP 
> address is obbtaained, how do you write to the IM windows and not the 
> main chat room where everyone is?  I'm slowly putting this together 
> but if there's a book, help me.
> 
> I'm reading schmidts seventh edition "java"  for this chat room, I dunno.
> 
> Public void paint (Graphics g, messagein)
> {
>   //message comes from server first, before that messager2
> 
>    g.drawstring(messagein)
> } 

This is a pretty low level way to get text on the screen. You might want 
to look at one of the text components, such as JTextArea. There's a 
related example here:

<http://stackoverflow.com/a/3245805/230513>

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

how to post to a frame outside an applet westin075@gmail.com - 2012-02-03 21:06 -0800
  Re: how to post to a frame outside an applet "John B. Matthews" <nospam@nospam.invalid> - 2012-02-07 07:00 -0500
  Re: how to post to a frame outside an applet "Richard Maher" <maher_rj@hotspamnotmail.com> - 2012-02-15 20:47 +0800

csiph-web