Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » plz help:java in eclipse view
plz help:java in eclipse view [message #445999] Tue, 16 November 2004 01:00 Go to next message
Eclipse UserFriend
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 13:50 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
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...
> ************************************************************ *********
>
>
>
>
>
Previous Topic:DND support for SWT browser
Next Topic:Transparency in the window title-bar icon
Goto Forum:
  


Current Time: Thu Oct 22 07:56:02 GMT 2020

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

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

Back to the top