final DateChooser smartGwtDateChooser = new DateChooser();
this.smartGwtDateChooser.setShowCancelButton(Boolean.TRUE);
cancelButton = this.smartGwtDateChooser.getCancelButton();
todayButton = this.smartGwtDateChooser.getTodayButton();
okButton = new IButton();
okButton.setTitle("OK");
HLayout buttonBar = this.smartGwtDateChooser.getButtonLayout();
cancelButton = this.smartGwtDateChooser.getCancelButton();
todayButton = this.smartGwtDateChooser.getTodayButton();
buttonBar.removeMembers(cancelButton, todayButton);
buttonBar.addMember(todayButton);
buttonBar.addMember(okButton);
buttonBar.addMember(cancelButton);
I get an exception on the line: cancelButton = this.smartGwtDateChooser.getCancelButton();
java.lang.IllegalStateException: Cannot access property cancelButton before the widget has been created.
How to I get around this? What am I doing wrong?
this.smartGwtDateChooser.setShowCancelButton(Boolean.TRUE);
cancelButton = this.smartGwtDateChooser.getCancelButton();
todayButton = this.smartGwtDateChooser.getTodayButton();
okButton = new IButton();
okButton.setTitle("OK");
HLayout buttonBar = this.smartGwtDateChooser.getButtonLayout();
cancelButton = this.smartGwtDateChooser.getCancelButton();
todayButton = this.smartGwtDateChooser.getTodayButton();
buttonBar.removeMembers(cancelButton, todayButton);
buttonBar.addMember(todayButton);
buttonBar.addMember(okButton);
buttonBar.addMember(cancelButton);
I get an exception on the line: cancelButton = this.smartGwtDateChooser.getCancelButton();
java.lang.IllegalStateException: Cannot access property cancelButton before the widget has been created.
How to I get around this? What am I doing wrong?