Executing a simple java application!!!! [message #466655] |
Thu, 12 January 2006 09:46 |
Eclipse User |
|
|
|
Originally posted by: gautamn_2002.yahoo.com
hi,
i have created a form and want to run this ....the tutorial say that
run by registering this view with the workbench and run...how to do that...
regards,
nitin.
//////////////////////////////////////////////////////////// ///////////
package org.eclipse.ui.forms.examples.views;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.*;
import org.eclipse.ui.part.ViewPart;
public class FormView extends ViewPart {
private FormToolkit toolkit;
private ScrolledForm form;
/**
* This is a callback that will allow us
* to create the viewer and initialize it.
*/
public void createPartControl(Composite parent) {
toolkit = new FormToolkit(parent.getDisplay());
form = toolkit.createForm(parent);
form.setText("Hello, Eclipse Forms");
}
/**
* Passing the focus request to the form.
*/
public void setFocus() {
form.setFocus();
}
/**
* Disposes the toolkit.
*/
public void dispose() {
toolkit.dispose();
super.dispose();
}
}
|
|
|
|
Powered by
FUDForum. Page generated in 0.03802 seconds