Java Glossary

Last updated 1998 June 16 by Roedy Green ©1996-1998 Canadian Mind Products.
Stuck in a frame? Click here to break out.

K

Kaffe
An GNU public licence Java interpreter and JIT for for 30 operating systems and 8 CPUS including the following platforms: i386 FreeBSD 2.0.5R & 2.1.0R, i386 Linux 1.2.13, i386 NetBSD 1.1R & current, i386 Solaris 2.4, i386 BSDI 2.1, and i386 Unixware.
Kazuki Yasumatsu Foundation Classes
Kazuki Yasumatsu's Foundation Classes including: All components are lightweight components written in 100% pure Java and compatible with AWT components. They also have many enhanced APIs.
Kawa
a development system for the Scheme language written in Java.
KFC
see Kazuki Yasumatusu Foundation Classes
KeyListener
If you want your component to process its own keystrokes, the easiest way is for your component to implement the KeyListener interface. This means you must write three routines, that the system calls each time the user hits a key. You always get a KeyEvent.KEY_PRESSED and KEY_RELEASED event, even for keys like Shift, Alt and function keys. You won't get a KEY_TYPED event when the user hits a key like Shift, Alt or a function key, but it may alter the effect of some other key that does generate a KEY_TYPED event.
public void keyPressed (KeyEvent e)
public void keyTyped (KeyEvent e)
public void keyReleased (KeyEvent e)
The various combinations of ID, KeyCode and KeyChar in the KeyEvent are quite complicated. I suggest writing a little piece of debug code like this and using it to get familiar with what sorts of events are generated when you hit Enter (KeyEvent.VK_ENTER which is a '\r' not '\n'), Shift-A, a, tab, F10, Home, End etc. Some keys, like Shift, generate a repeating KEY_PRESSED if you hold them down.
public void dumpKeyEvent (KeyEvent e)
  {
  System.out.print(" ID=" + e.getID());
  System.out.print(" KeyCode=" + e.getKeyCode());
  System.out.print(" KeyChar=\"" + e.getKeyChar() + "\" " + (int)e.getKeyChar());
  System.out.println();
  }
Just insert a call to dumpKeyEvent in each of your three keystroke event handler methods.
Happily, keyPressed(KeyEvent e) only sees id=KeyEvent.KEY_PRESSED events, keyTyped only sees id=KEY_TYPED events, and keyReleased only sees id=KEY_RELEASED events.
Usually somewhere in the component or panel's constructor, you must remember to register your component as an interested listener with this.addKeyListener(this); Make sure you don't do it more than once or you will see multiple keyPressed events per keystroke. Your handler can use KeyEvent.consume() to mark the keystroke as fully handled. This will discourage default keystroke handling code from being invoked as well. Keep in mind your component won't see any keystroke events unless it has focus. Keep in mind that not all components generate KeyEvents. They may generate ActionEvents or ItemStateChangedEvents instead. See the essay under events for more details. (To come, techniques to control additional pre or post processing on a keystroke by the superclass.)
Kiev
An extension of Java and Pizza with the following features: It has an AI Engine! Like Prolog, it allows write rules that not only answer yes/no, but are able to find one or all solutions. And it's fully integrated - you may use native java data and methods from AI engine, and AI rules as ordinary Kiev methods.
K56flex
Rockwell's candidate for 56 kbps standard that competes with 3COM/USRs X2. I hold a deep grudge against Rockwell for using my software violating the non-military use provision. When I asked them to stop, a Rockwell employee told me to "F*** off". I have never been so furious in my life. I literally saw red, little red fringes around objects. This standard has been supplanted by V.90.
KL Group
a company that writes AWT components such as Tab Manager, Multi-column list, Toggle Button, TextArea, TextField, ArrowButton, ComboBox, SpinBox, AlignerLayout, ProgressMeter, Slider and SplitterWindow.
klassMaster
Zelix KlassMaster is a freeware Java obfuscator, Java unobfuscator, Java bytecode editor, Java bytecode viewer. See shroud.
kludge
the electronic equivalent to doing repairs with chewing gum, bailing wire or duct tape. It is a derogratory term for a coding technique that cheats in some way or that violates the good design principles.
Knuth, Donald
Another name for God. Knuth has been around longer though. His series of books on algorithms and and computing written back in the 1960s are still definitive. Every time I invented an incredible new algorithm, someone would point out the idea was old hat, described in a footnote somewhere in Knuth. I did finally figure out a way of doing multiprecision divide a little faster than his algorithm.
Koala
An HTML parser. See parser.
Kona
Lotus's working name for the Ensuite product. See Ensuite.
Krakatau
a collection of Java applet source code for teaching purposes.
Krakatoa
See Krakatau




HTML Checked! award
Canadian Mind Products The Mining Company's
Focus on Java
Best of the Net Award
You can get an updated copy of this page from http://mindprod.com/jglossk.html