Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / January 2008

Tip: Looking for answers? Try searching our database.

Events

Thread view: 
Akki - 23 Jan 2008 18:08 GMT
Hi,

I am a new to GUI programming in Java. I want to creat a GUI in which
I will ask the user to write a word in the Text field, based on which
the s/w will call certain functions. I have created JFrame inside
which I have made a JDesktopPane, inside which I have the JScrollPane
with the JTextArea.
I have registered the KeyPressed Event with the JTextArea. But when I
write something and press Enter, the Event is not recognized and the
appropriate action is not taken.

How do I solve this issue ?

TIA,
Darth
Roedy Green - 23 Jan 2008 21:23 GMT
On Wed, 23 Jan 2008 10:08:53 -0800 (PST), Akki
<lodhaakhil85@gmail.com> wrote, quoted or indirectly quoted someone
who said :

>I have registered the KeyPressed Event with the JTextArea. But when I
>write something and press Enter, the Event is not recognized and the
>appropriate action is not taken.

A KeyPressed event is a low level event.  It gets converted to various
other types of event.  Check the JavaDoc for JTextArea to see what
sorts of listeners it likes.

See http://mindprod.com/jgloss/event.html
http://mindprod.com/jgloss/jtextarea.html
Signature

Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com

Roedy Green - 24 Jan 2008 00:43 GMT
On Wed, 23 Jan 2008 21:23:09 GMT, Roedy Green
<see_website@mindprod.com.invalid> wrote, quoted or indirectly quoted
someone who said :

>http://mindprod.com/jgloss/event.html
oops
http://mindprod.com/jgloss/event11.html
Signature

Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com

Akki - 24 Jan 2008 11:45 GMT
Got it working. Thanks !
On Jan 24, 5:43 am, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> On Wed, 23 Jan 2008 21:23:09 GMT, Roedy Green
> <see_webs...@mindprod.com.invalid> wrote, quoted or indirectly quoted
[quoted text clipped - 6 lines]
> Roedy Green, Canadian Mind Products
> The Java Glossary,http://mindprod.com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.