Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326805 - CTRL+C CTRL+V shortcut bug in a Mozilla browser embedded in AWT SWT
Summary: CTRL+C CTRL+V shortcut bug in a Mozilla browser embedded in AWT SWT
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-01 13:09 EDT by zugasti CLA
Modified: 2017-07-04 13:37 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zugasti CLA 2010-10-01 13:09:26 EDT
Hello, We've tried this snippet coming from your site with the last XULRunner version 1.9.2.10.

This does work with IE but not with Mozilla.

Any help would be greatfully appreciated.

Thanks in advance

package ccr.technique.components.panel;

/*
 * SWT_AWT example snippet: launch SWT from AWT and keep both active
 * 
 * For a list of all SWT example snippets see
 * http://www.eclipse.org/swt/snippets/
 */

import java.awt.BorderLayout;
import java.awt.Canvas;
import java.awt.EventQueue;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;

import org.eclipse.swt.SWT;
import org.eclipse.swt.awt.SWT_AWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class Snippet337 {

public static void main(String args[]) {
	final Display display = new Display();

	EventQueue.invokeLater(new Runnable() {
		public void run() {
			JFrame mainFrame = new JFrame("Main Window");
			mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
			JPanel mainPanel = new JPanel();
			mainPanel.setLayout(new FlowLayout());
			JButton launchBrowserButton = new JButton("Launch Browser");
			launchBrowserButton.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					JFrame childFrame = new JFrame();
					final Canvas canvas = new Canvas();
					childFrame.setSize(850, 650);
					childFrame.getContentPane().add(canvas);
					childFrame.setVisible(true);
					display.asyncExec(new Runnable() {
						public void run() {
							Shell shell = SWT_AWT.new_Shell(display, canvas);
							shell.setSize(800, 600);
							Browser browser = new Browser(shell, SWT.MOZILLA);
							browser.setLayoutData(new GridData(GridData.FILL_BOTH));
							browser.setSize(800, 600);
							browser.setUrl("http://www.eclipse.org");
							shell.open();
						}
					});
				}
			});

			mainPanel.add(new JTextField("a JTextField"));
			mainPanel.add(launchBrowserButton);
			mainFrame.getContentPane().add(mainPanel, BorderLayout.CENTER);
			mainFrame.pack();
			mainFrame.setVisible(true);
		}
	});
	while (true) {
		if (!display.readAndDispatch()) display.sleep();
	}
}

}
Comment 1 Alexander Kurtakov CLA 2017-07-04 13:37:44 EDT
Mozills support is removed in 4.8.