Cloudgarden Discussion Board
This topic has 5 replies.
[ << Previous Topic | Start of Thread | >> Next Topic ]
|Bug: "String index out of range: -1"
When creating a new JFrame or JPanel (haven't tried with others) and untick the "Add main method" check box the error message "String index out of range: -1" appears.
| Reply 1 of 5||07/14/10 05:18||Reply|
|I can't reproduce this bug in version 4.6.2 - please try that version and if it still occurs tell me the eclipse version and platform you are using please.|
| Reply 2 of 5||07/14/10 09:14||Reply|
I believe that I was using 4.6.2 at the time when I wrote the initial forum entry, but I'm not sure. However, I tried it again, and it's still not working.
See http://tinyurl.com/374uv6h for a screenshot.
My eclipse configuration (Help -> About Eclipse SDK -> Installation details -> Configuration): http://tinyurl.com/32r5j73
I also noticed in the error log that I have a shortcut name clash that involves jigloo: http://tinyurl.com/36j7l9y. I don't think that is at least releated to this issue, but better safe than sorry :)
| Reply 4 of 5||07/14/10 09:20||Reply|
|I now see that back slashes got lost when publishing the configuration at textdump dot com|
| Reply 5 of 5||07/14/10 11:23||Reply|
|I think I might be on to something now.
In eclipse I have a custom formatter (see Window -> Preferences -> Java -> Code style -> Formatter)
My choise for Indentation -> Tab policy is 'spaces only'. If I change it to 'tabs only' (or change to the eclipse built in formatter) then I can create the frame/panel without a main class.
But even though I don't have a main method, I get a method comment saying: Auto-generated main method to display this JFrame
Hope this helps