Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Executing a simple java application!!!!
Executing a simple java application!!!! [message #466655] Thu, 12 January 2006 09:46 Go to next message
Eclipse UserFriend
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();
}
}
Re: Executing a simple java application!!!! [message #466656 is a reply to message #466655] Thu, 12 January 2006 11:36 Go to previous message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
you have to make rcp application or plugin and then execute
eclipse application
Nitin Gautam wrote:

>
> 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();
> }
> }
Previous Topic:Remove/Delete a TreeItem from Tree
Next Topic:how can i make the "uninstall" item available?
Goto Forum:
  


Current Time: Sat May 25 02:50:12 GMT 2019

Powered by FUDForum. Page generated in 0.01710 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top