Results 1 to 1 of 1
Thread: Stack layout
- 03-22-2009, 01:15 PM #1
Member
- Join Date
- Sep 2008
- Posts
- 2
- Rep Power
- 0
Stack layout
Hello
i want to design simple wizard in swt(not jface) with 2 pages in the first page i have next button that lead me to the second page. and in the second page i have previous page that lead me to the first page.
i succeed to make the next page :
display = new Display();
shell = new Shell(display,SWT.SHELL_TRIM ^ SWT.MAX ^ SWT.RESIZE);
nextButton = new Button(shell, SWT.PUSH | SWT.CENTER);
nextButton.setText("Next");
nextButton.setBounds(475, 334, 107, 30);
nextButton.addSelectionListener(new SelectionAdapter()
{
public void widgetSelected(SelectionEvent evt)
{
stackLayout = new StackLayout();
shell.setLayout(stackLayout);
shell.layout();
//add gui elements to the second page.
//add previous button in the second page
backbutton = new Button(shell, SWT.PUSH | SWT.CENTER);
backbutton.setText("back");
backbutton.setBounds(75, 302, 107, 30);
backbutton.addSelectionListener(new SelectionAdapter()
{
public void widgetSelected(SelectionEvent evt)
{
//to do????????????
}
});
});
i don;t know how to add event handling to the back button,the next button above is working fine ,but i don;t know how to return to the first page can any one please help me ?
Thanks in advance...
Similar Threads
-
Need help please – implementing a stack!
By sfe23 in forum New To JavaReplies: 0Last Post: 02-24-2009, 03:19 PM -
Stack problem..pls help
By Mika in forum New To JavaReplies: 1Last Post: 02-16-2009, 08:10 AM -
Stack not popping
By bugger in forum New To JavaReplies: 2Last Post: 01-28-2008, 04:59 PM -
Stack Trace
By Java Tip in forum Java TipReplies: 0Last Post: 12-10-2007, 05:29 PM -
Help with heap and stack
By coco in forum Advanced JavaReplies: 1Last Post: 08-06-2007, 02:21 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks