[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[swtbot-dev] swt radio buttons


I am wondering could anybody help me!
I want to have two buttons that displays different pictures. when I
choose the first radio button my picture appears but when I choose the
second one after my second picture will not appear?

Here is my code:

 final Button buttondog= new Button(c1, SWT.RADIO);
   buttondog.setBounds(10, 20, 169, 21);

   final Button buttoncat= new Button(c1, SWT.RADIO);
   buttoncat.setBounds(10, 50, 169, 21);

   buttonradio.addListener (SWT.Selection, new Listener () {
  public void handleEvent (Event event) {
   buttondog.getSelection == true;
   img = new Label(page1, SWT.TOP);
   img.setBounds(300, 100, 992, 568);

 buttoncat.addListener (SWT.Selection, new Listener () {
 public void handleEvent (Event event2) {
 img2 = new Label(page1, SWT.TOP);
 img2.setBounds(300, 100, 992, 568);

Can anyone help:?