Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

How to add Dynamic GUI components using SWT

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI ,
I am new to SWT. Can anybody please help me out with this? I need to implement the following

Group A
text t1
text t2
List l1
Check Box c1, c2 c3

//Group A ends
Button "Add New"

Clicking on "Add New" paints the following

Group A //with in Group A
text t1_1
text t2_1
List list1_1
Check Box c1_1, c2_1 c3_1

text t1_2
text t2_2
List list1_2
Check Box c1_2, c2_2 c3_2

All the feilds should be editable.

Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I implemented what youre talking about by basically adding all possible widgets first. then, when i want a widget to change, i simply add in the widget which invokes that change, an action listener i.e.

//widget A causes widget B to apper

Button a = new Button(parent,SWT.NONE);
final Button b = new Button(parent,SWT.NONE);


new ActionListener()
public actionPerformer(actionEvent arg0)

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!