1. Create a new SWT Application
2. Add FillLayout
3. Add Text Control
4. Set background for TextControl to a pretty color;
Switch back to Source view, we now have unresolved import:
- Code: Select all
import com.swtdesigner.ResourceManager;
and of course usage of ResourceManager can't be resolved either.
- Code: Select all
final Display display = new Display();
final Shell shell = new Shell();
shell.setLayout(new FillLayout());
shell.setText("My SWT Application");
{
final Text text = new Text(shell, SWT.BORDER);
text.setBackground(ResourceManager.getColor(255, 128, 128));
text.setText("text");
}
// DESIGNER: Add controls before this line.
I looked in %eclipse%\plugins\com.swtdesigner.free\designer.jar
but couldn't find com.swtdesigner.ResourceManager class.
Where is the missing class located?