Solved

Focus-Lost Event

Posted on 2004-09-03
6
903 Views
Last Modified: 2008-03-17
How can we programmatically fire a Focus Lost event inside a function (so the program can go & do the code of the focus lost event, and then return to the function)?
Thanks in advance :)
0
Comment
Question by:mte01
  • 3
  • 2
6 Comments
 
LVL 8

Expert Comment

by:thomas908
ID: 11979153
0
 
LVL 8

Expert Comment

by:thomas908
ID: 11979154
0
 
LVL 8

Expert Comment

by:thomas908
ID: 11979158
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 3

Author Comment

by:mte01
ID: 11979294
To clarify my question:

I want to do the following inside a function:

DefaultFocusManager fm = new DefaultFocusManager();
fm.processKeyEvent(jtablex,KeyEvent.VK_TAB);

so I can programmatically process the TAB Key Event (as if the user has pressed this key - because some naive users foeget to press it after finishing editing). The problem with this code is that KeyEvent.VK_TAB is an integer not a KeyEvent object (and there is no overloaded function to take a component and a KeyEvent object), so what do I do?

P.S.: I want the code to be compatible to java 1.3.* (not above)
0
 
LVL 30

Accepted Solution

by:
mayankeagle earned 250 total points
ID: 11980042
I guess you need to create a FocusEvent object and post it to the event-queue using EventQueue.postEvent ().
0
 
LVL 3

Author Comment

by:mte01
ID: 11980251
That did the trick! It initiated the focus Lost event, but my original problem was not solved (which I thought the focus_Lost event would solve it); I will post it in a new question
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
sumDigits  challenge 7 60
array6 challenfge 6 62
wordappend challenge 8 85
solarwind tftp server 2 30
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now