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 7868357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:58:29+00:00 2026-06-03T00:58:29+00:00

I am trying to adapt code from AWT to eclipse SWT plugin.I’m facing refresh

  • 0

I am trying to adapt code from AWT to eclipse SWT plugin.I’m facing refresh issue.I have view with table(AWT) and another view with chart(AWT). Individually they are fine but when i’m add both i’m facing refresh issue only on chart view, any advises ?? Thanks in advance.

  • 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-06-03T00:58:31+00:00Added an answer on June 3, 2026 at 12:58 am

    Here’s what I had to do to embed a JPanel in an SWT view.

            Composite videoComposite = new Composite(panel, 
                    SWT.EMBEDDED | SWT.BORDER | SWT.NO_BACKGROUND);
            videoComposite.setLayout(new FillLayout());
            videoComposite.setLayoutData(new GridData(
                    SWT.CENTER, SWT.CENTER, true, true, 1, 1));
    
            CLabel videoImage = new CLabel(videoComposite, SWT.SHADOW_IN);
            videoImage.setImage(dummyVideo);
    
            frame = SWT_AWT.new_Frame(videoComposite);
    
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    setLookAndFeel();
                    applet = new JApplet();
                    applet.setFocusCycleRoot(false);
                    mediaPanel = rabidVideo.getVideoPanel(false);
                    applet.add(mediaPanel);
                    frame.add(applet);
                }
            });
    

    where frame is a Frame, applet is a JApplet, and mediaPanel is an extension of JPanel.

    Here’s setLookAndFeel:

    protected void setLookAndFeel() {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (ClassNotFoundException e) {
            EclipseLogging.logError(RabidPlugin.getDefault(),
                        RabidPlugin.PLUGIN_ID, e);
        } catch (InstantiationException e) {
            EclipseLogging.logError(RabidPlugin.getDefault(),
                        RabidPlugin.PLUGIN_ID, e);
        } catch (IllegalAccessException e) {
            EclipseLogging.logError(RabidPlugin.getDefault(),
                        RabidPlugin.PLUGIN_ID, e);
        } catch (UnsupportedLookAndFeelException e) {
            EclipseLogging.logError(RabidPlugin.getDefault(),
                        RabidPlugin.PLUGIN_ID, e);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to adapt a code to extract information from wunderground. However the script
Im trying to adapt some code that I have found online that uses this
I'm trying to adapt some code from a simple app that uses Raphael to
I'm trying to adapt my code with json in google maps. I tried looking
Hy there, I'm trying to adapt an existing code to boost::variant. The idea is
I am trying to adapt the underlying structure of plotting code (matplotlib) that is
I'm trying to adapt some tornado code to work with twisted. Tornado's IOLoop has
I'm starting with the C# code example here . I'm trying to adapt it
I am trying to change my code to msqli prepared statements from mysql. I
I'm trying to adapt my GWT web application from my home-grown MVC to GWT

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.