plz help:java in eclipse view [message #445999] |
Mon, 15 November 2004 20:00  |
Eclipse User |
|
|
|
Originally posted by: spicydane.hotmail.com
how can i add a Swing class that extends JPanel implements WindowListener
into an AWT Frame which is again in an SWT Composite ;in an
eclipse view;
plz help
the class i want to add looks like this...
//////////////////////////////////////////////////////////// /
import java.awt.*;
import java.awt.event.*;
import java.util.*;
//swing
import javax.swing.*;
class GraphDesing extends JPanel implements MouseListener
{
..........................................
}
//////////////////////////////////////////////////////////// //
i would want to add this class to an AWT Frame of an eclipse view...the
code follows...
***********************************************************
public void createPartControl(Composite parent)
{
parent_comp = parent;
contributeToActionBars();
makeActions();
tabFolder = new TabFolder(parent,SWT.BAR);
tabitem1=new TabItem(tabFolder,SWT.NULL);
{
tabitem1.setText( "Event Graph(&E) " );
{
SashForm sashForm = new SashForm( tabFolder, SWT.BAR);
eventList =new List (sashForm,SWT.BORDER|SWT.H_SCROLL|SWT.V_SCROLL);
Monitor_comp = new Composite(sashForm,SWT.EMBEDDED);
Frame chartFrame = SWT_AWT.new_Frame(Monitor_comp);
.........................
..........................
}
}
i'm further tryin to open this JPanel class data when i select a menu item
from the pull down menu of the eclipse view...
thanx for ur patience...
************************************************************ *********
|
|
|
Re: plz help:java in eclipse view [message #446035 is a reply to message #445999] |
Tue, 16 November 2004 08:50  |
Eclipse User |
|
|
|
See:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet135.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup
"diana" <spicydane@hotmail.com> wrote in message
news:cnbjg8$ct$1@www.eclipse.org...
>
> how can i add a Swing class that extends JPanel implements WindowListener
> into an AWT Frame which is again in an SWT Composite ;in an
> eclipse view; plz help the class i want to add looks like this...
>
> //////////////////////////////////////////////////////////// /
>
> import java.awt.*;
> import java.awt.event.*;
> import java.util.*;
> //swing
> import javax.swing.*;
>
> class GraphDesing extends JPanel implements MouseListener
> { .........................................
> }
>
> //////////////////////////////////////////////////////////// //
>
> i would want to add this class to an AWT Frame of an eclipse view...the
> code follows...
>
> ***********************************************************
>
> public void createPartControl(Composite parent)
> {
> parent_comp = parent; contributeToActionBars();
> makeActions();
> tabFolder = new TabFolder(parent,SWT.BAR);
> tabitem1=new TabItem(tabFolder,SWT.NULL); {
> tabitem1.setText( "Event Graph(&E) " );
> {
> SashForm sashForm = new SashForm( tabFolder, SWT.BAR);
> eventList =new List (sashForm,SWT.BORDER|SWT.H_SCROLL|SWT.V_SCROLL);
> Monitor_comp = new Composite(sashForm,SWT.EMBEDDED);
> Frame chartFrame = SWT_AWT.new_Frame(Monitor_comp);
> .........................
> ..........................
> }
> }
>
> i'm further tryin to open this JPanel class data when i select a menu item
> from the pull down menu of the eclipse view...
>
> thanx for ur patience...
> ************************************************************ *********
>
>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03554 seconds