Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2010
    Posts
    2
    Rep Power
    0

    Default swt Display and Shell in JTabbedPane : Jintilla

    Hello,
    i'm currently developping a color syntax editor, in i want to use JIntilla wich is a JNI interface of Scintilla control.
    I would like to show a composite draw inside a pane of a JTabbedPane :
    my question is : how to replace ( connect ) Display and shell by a standard panel ?

    sample code of Jintilla interface that i would like to integrate in JPanel:

    public static void main (String args[]) {
    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setSize(new org.eclipse.swt.graphics.Point(580, 394));
    shell.setText("Scintilla Test");

    GridLayout gridLayout = new GridLayout();
    shell.setLayout(gridLayout);
    gridLayout.marginWidth = 0;

    final Scintilla scintilla = new Scintilla(shell, SWT.NONE);
    scintilla.setFocus();

    ...

    shell.layout();
    shell.open();

    while (!shell.isDisposed()) {
    if (!display.readAndDispatch()) display.sleep();
    }
    display.dispose();
    }


    Thank you for your help !!!!
    Fred

  2. #2
    AndreB's Avatar
    AndreB is offline Senior Member
    Join Date
    Dec 2009
    Location
    Stuttgart, Germany
    Posts
    114
    Rep Power
    0

    Default

    since i discovered this page, maybe it can help
    link
    Last edited by AndreB; 01-12-2010 at 11:44 PM.
    "There is no foolproof thing; fools are too smart."
    "Why can't you solve my Problem ?"

  3. #3
    Join Date
    Jan 2010
    Posts
    2
    Rep Power
    0

    Default Great link !!

    Thank you for the link, i will inverstigate for this bridge.

    I develop my application with Swing and i try to integrate SWT components.
    I think i'm wrong : i must develop an SWT application that integrate Swing components !!!

    Thank you !
    Fred

  4. #4
    AndreB's Avatar
    AndreB is offline Senior Member
    Join Date
    Dec 2009
    Location
    Stuttgart, Germany
    Posts
    114
    Rep Power
    0

    Default

    then the SWT_AWT bridge should help.
    in my experience however it works only on standard java awt components (and it makes trouble with swing)
    so no prefuse, proccessing or any other 3rd party library will work properly. But i may be wrong
    "There is no foolproof thing; fools are too smart."
    "Why can't you solve my Problem ?"

Similar Threads

  1. Traversing a JTabbedPane
    By Inks in forum AWT / Swing
    Replies: 12
    Last Post: 03-11-2009, 06:15 AM
  2. How to use JTabbedPane
    By Java Tip in forum javax.swing
    Replies: 0
    Last Post: 06-27-2008, 08:50 PM
  3. Replies: 0
    Last Post: 04-04-2008, 01:15 AM
  4. Help with JTabbedPane
    By lenny in forum SWT / JFace
    Replies: 1
    Last Post: 08-07-2007, 07:18 AM
  5. Same component on all JTabbedPane
    By java_novice in forum AWT / Swing
    Replies: 4
    Last Post: 08-06-2007, 10:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •