This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 204176 - Typing problem when insert record into the table
Summary: Typing problem when insert record into the table
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.1
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-24 19:22 UTC by medeag
Modified: 2013-08-13 08:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description medeag 2011-10-24 19:22:40 UTC
Product Version: NetBeans IDE Dev (Build 201110240600)
Java: 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02-384
System: Mac OS X version 10.6.8 running on x86_64; MacRoman; 

Trying to insert data in table using Insert Record(s) 
After i typed in varchar field first symbol it got automatically selected and of course after i typed other symbols the first symbol got deleted. This shouldn't be so.
Comment 1 Jaroslav Havlin 2012-06-08 14:04:21 UTC
It seems to work fine now. After the first symbol is typed, the cell (not the text in it) is selected and new letters are appended to its content.
Please check a recent release (development build or 7.2 Beta) and reopen the issue if the bug is still present. Thank you.
Comment 2 medeag 2012-11-26 08:09:42 UTC
I was able to reproduce this issue in

Product Version: NetBeans IDE Dev (Build 201211200002)
Java: 1.7.0_10-ea; Java HotSpot(TM) 64-Bit Server VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_10-ea-b15
System: Mac OS X version 10.7.5 running on x86_64; US-ASCII; ka_GE (nb)

clicked on text field, it became blue, typed something the first letter was deleted, 
No problem when i see cursor in the field
Comment 3 Jaroslav Havlin 2012-11-26 09:35:34 UTC
I'm sorry, I cannot reproduce it.
Does this happen every time you type something in a cell, or only sometimes?
Comment 4 medeag 2012-11-26 10:33:56 UTC
Yes, this happens always, but not when the cursor is in field, only when i first click field and it is becomes blue and the begin typing.
Comment 5 Libor Fischmeistr 2013-08-08 13:00:23 UTC
I can confirm this behavior on Mac. It's weird because the original JTextField works normally and when getting focus it does not select whole text as it happens in the table cell.
Comment 6 matthias42 2013-08-08 17:53:00 UTC
This smells like a Mac OS specific problem - I can't reproduce (Metal LAF on Linux), Jaroslav was not able to reproduce and both systems on which the bug could be reproduced are Mac OS X Systems. I did some quick googling and there were the first matches:

[1] http://stackoverflow.com/questions/1543480/mac-lf-problems-differing-behavior-of-jtextfield-requestfocus
[2] http://lists.apple.com/archives/java-dev/2008/Jul/msg00007.html
[3] http://www.coderanch.com/t/111732/Mac/JTextField-automatic-selction-CellEditor

in the last link [3], the first entry, the problem description matches this problem.

A quick guess: Applying the suggestested fix in [3] third entry should be doable in ResultSetTableCellEditor constructor, that takes a JTextField. (this is untested, as I don't own a Mac).
Comment 7 Libor Fischmeistr 2013-08-09 09:46:58 UTC
(In reply to comment #6)
> This smells like a Mac OS specific problem - I can't reproduce (Metal LAF on
> Linux), Jaroslav was not able to reproduce and both systems on which the bug
> could be reproduced are Mac OS X Systems. I did some quick googling and there
> were the first matches:
> 
> [1]
> http://stackoverflow.com/questions/1543480/mac-lf-problems-differing-behavior-of-jtextfield-requestfocus
> [2] http://lists.apple.com/archives/java-dev/2008/Jul/msg00007.html
> [3]
> http://www.coderanch.com/t/111732/Mac/JTextField-automatic-selction-CellEditor
> 
> in the last link [3], the first entry, the problem description matches this
> problem.
> 
> A quick guess: Applying the suggestested fix in [3] third entry should be
> doable in ResultSetTableCellEditor constructor, that takes a JTextField. (this
> is untested, as I don't own a Mac).

This is definitely the MacOS specific. I tried it on several systems and only on Mac this problem appeared.

I will try the workarround on Monday, as soon as I will have the access to Mac.

Thanks for that links.
Comment 8 Libor Fischmeistr 2013-08-12 08:22:35 UTC
I tried that patch with setting default caret and for me it seems that it works fine and fixes problem on MacOS L&F and nothing changes on Windows. Matthias I would like you to confirm, that nothing has been affected on Linux. And also I would ask medeag to verify fix on Mac.

Fix: http://hg.netbeans.org/core-main/rev/a80e2daa3449

Thanks all
Comment 9 matthias42 2013-08-12 18:39:47 UTC
(In reply to Libor Fischmeistr from comment #8)
> Matthias I would like you to confirm, that nothing has been affected on
> Linux.

Just finished a build from core-main - the patch is in the log and the feeling is the same as before the change. So from me this looks good. Tested Metal + Nimbus LAF.
Comment 10 Libor Fischmeistr 2013-08-13 08:03:33 UTC
Thanks a lot Matthias