JTextField not sized properly
"jhuber" <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello! I'm using the GUI builder in my NetBeans Platform application and have had this nagging problem for some time now with JTextField objects in that they don't quite properly resize themselves, such that a portion of the first character is partially missing. This issue doesn't seem to affect other objects. In the enclosed image, I have a JLabel and JTextField side by side. Both have the horizontal and vertical size set to "Default". The label is fine, but the text field isn't. I've tried different borders, different fonts, different margins, and a host of other things, but nothing seems to work. It, seems to be some kind of problem with the internal sizing of text area. This effect is the worst in the Windows and Metal LAF. It is noticeably better in Nimbus, but still happens a little bit. Many customers don't like Nimbus, and so use the default LAF, which in Windows happens to be the Windows LAF, so this problem exists. A quick and dirty solution is to add an extra space character to the front of each string, but that is tedious, and seemingly should be unnecessary. I'm using NetBeans 8.0.2, but I'm pretty sure this was going on in NetBeans 7 as well. Any thoughts or suggestions? Thanks! [/img] Attachments: http://forums.netbeans.org//files/jtf_220.png