OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #gemini-pda chat on Freenode | #zaurus and #alarmz chat on Freenode | ELSI (coming soon) | Ibiblio


Welcome Guest ( Log In | Register )

> Java App Freezes When Using Textfield
post Apr 7 2005, 06:39 PM
Post #1

Group: Members
Posts: 60
Joined: 12-February 05
Member No.: 6,461

Long story short, I wrote a Java app thet works fine on my desktop, and works fine on my Zaurus 3000 until it hits KeyAdapter code for a TextField.

Specifically it freezes when I try to access the TextField in the adapter.

I know that it's not the TextFiled nor the adapter per se but the combination of accessing the TextField from inside it's adapter. I can use the TextField other palces in the code fine, and if I remove the use of the TextField from the adapter code everything works fine.

It's only my adapter tries to use the TextField my app freezes. The relevant code looks like this:

answerTF.addKeyListener(new KeyPressed());

private class KeyPressed extends KeyAdapter {
public void keyPressed(java.awt.event.KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
/* the line below causes app to freeze */
System.out.println("Entry is: " + answerTF.getText());

Any ideas?
Go to the top of the page
+Quote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 22nd April 2018 - 03:00 AM