🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #1049

JTextArea question

#1049
From: George
Date: Wed, 21 Apr 2004 19:21
11 lines
1315 bytes
I have a JTextArea in which a user types SQL Commands.  I'd like to provide
a token-completion feature i.e when the user types CTRL-space I want to
bring up a window with a list box of certain database object names (similar
to what JBuilder provides in the editor).

My problem is where to position this window.  How can I go from the caret
location of the JTextArea to the x-y coordinates needed to position the
window?

TIA.
George
Technical Details
Message-ID: <4086c951$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!nx01.iad01.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,36cb0f214b8bd976,start
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2004-04-21 12:30:57 PST
From: "George" <geo_54321@yahoo.com>
Newsgroups: borland.public.jbuilder.java.swing
Subject: JTextArea question
Date: Wed, 21 Apr 2004 15:21:20 -0400
Lines: 14
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 63.119.115.129
Message-ID: <4086c951$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1082575185 63.119.115.129 (21 Apr 2004 12:19:45 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!nx01.iad01.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail