Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 654049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:27:04+00:00 2026-05-13T22:27:04+00:00

I am trying to embed a JFace TableViewer in a SWT TabFolder , but

  • 0

I am trying to embed a JFace TableViewer in a SWT TabFolder, but when I do so, the table does not show up. The current (working code) in my GitToDo code looks like (see this Git repos):

    final Display display = new Display();
    final Shell shell = new Shell(display);
    shell.setText("Git ToDo");
    FillLayout layout = new FillLayout();
    shell.setLayout(layout);

    final GitToDoTree tableViewer = new GitToDoTree(shell);

Where the latter GitToDoTree extends TableViewer, with this constructor:

    super(parent, SWT.SINGLE | SWT.FULL_SELECTION | SWT.FILL);
    this.shell = parent;
    table = this.getTable();
    table.setHeaderVisible(true);
    table.setLinesVisible(true);

So, when I construct the TableViewer-extending GitToDoTree from a Shell it works, but as soon as I try to build it from a TabFolder or (tried that too) a Composite, nothing shows up anymore.

How can I get my TableViewer to show up in the TabFolder?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:27:04+00:00Added an answer on May 13, 2026 at 10:27 pm

    If your TableViewer class isn’t showing up when you add it to a Composite I would say that chances are that you are not setting a layout for the nested Composite.

    final Display display = new Display();
    final Shell shell = new Shell(display);
    shell.setText("Git ToDo");
    FillLayout layout = new FillLayout();
    shell.setLayout(layout);
    
    Composite composite = new Composite(shell, SWT.NONE);
    composite.setLayout(new FillLayout()); // Possible missing layout?
    
    final GitToDoTree tableViewer = new GitToDoTree(composite);
    

    And as for the TabFolder that may be that you are not setting the client control on the TabItem

    TabFolder tabFolder = new TabFolder(shell, SWT.NONE);
    TabItem item = new TabItem(tabFolder, SWT.NONE);
    item.setText("Table");
    
    GitToDoTree viewer = new GitToDoTree(tabFolder);
    item.setControl(viewer.getTable()); // Possible setControl call?
    
    TabItem item2= new TabItem(tabFolder, SWT.NONE);
    item2.setText("Empty");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to embed a IPTC data onto a JPEG image using iptcembed() but
Im trying to put an html embed code for a flash video into the
I am trying to embed multiple external websites into one web page. Using an
I'm trying to embed my Subversion revision number in a C++ project and am
I'm trying to embed a window from my process into the window of an
I'm trying to do the following in my Django template: {% for embed in
I'm trying to use the MusiSync font to embed a sharp and flat symbol
Trying to embed Flash into a HTML page using FBML tag fb:swf and I
I've been trying to embed an icon (.ico) into my compyled .exe with py2exe.
I'm trying to embed Google's directions into an iphone app There doesn't seem to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.