Hello guys,
on a previous post I have asked for help and, later on, succeeded in developing a browser using SWT.
Now, since I wanted to embed it, I have put it into a Canvas and now I need to add this canvas onto a JFrame.
The problem is that the canvas is added (you can see the area it allocates), but the content of the canvas (the webpage), does not show up.
But, if I create a whole new JFrame just for the canvas, then it works.
But I need to have just 1 Frame with the browser in it.
I am running a thread for the GUI and then a thread for the Browser.
I will add, from a different class, the component Canvas and set its bounds. here is some code:
final Display display = new Display(); Canvas embedded = new Canvas(); GUI.mainFrame.add(embedded); embedded.setBounds(0,0,300,300); final Shell shell = SWT_AWT.new_Shell(display, embedded); shell.setLayout(new FillLayout(SWT.VERTICAL));
Is there maybe a problem here?