-2

I have the following import in 2 identical programs (ok, maybe they weren't identical. They looked identical, but I forgot that the first was created with WindowBuilderPro):

import org.eclipse.wb.swing.FocusTraversalOnArray;

In the first program it's ok. In the second, Eclipse can't resolve it. The build path is identical. Any ideas why?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
George Tomlinson
  • 1,871
  • 3
  • 17
  • 32

1 Answers1

0

Just worked out the answer: the first was created with WindowBuilderPro, the second without. WindowBuilderPro inserted the import automatically. Why this means the first program doesn't work and the second does, I don't know, so this doesn't answer the question 'Why can the import not be resolved?' fully, but it does show how to get from a program which has an error to one which doesn't (use WindowBuilderPro), which is fine for me for the time being.

George Tomlinson
  • 1,871
  • 3
  • 17
  • 32
  • 1
    Firstly, you never specified in the question about `WindowBuilder` in your question. Also, how did using it not give the error and not using it, gave the error. Don't you need to mention it in your answer, so that later anybody else referring your answer can know about it?! – Rahul Oct 26 '13 at 14:01
  • The reason I never mentioned it in my question is because it hadn't occurred to me that this would cause the import to be unresolved, but I take your second point. +1 for useful feedback – George Tomlinson Oct 26 '13 at 14:19
  • For me there was a difference! When creating with WindowBuilder and using FocusTraversalOnArray, it adds a package to my project... Copy that package and you should be fine... – geisterfurz007 Nov 09 '16 at 07:26