|
|
Re: Swing problems in Eclipse. [message #496867 is a reply to message #496654] |
Wed, 11 November 2009 15:26 |
Grant Gayed Messages: 2150 Registered: July 2009 |
Senior Member |
|
|
I haven't heard of this before, and the basic snippet below works for me on
Windows, so it must be somewhat dependent on your context. Which platform
do you see this on? Which version of SWT are you using? Can you change the
snippet below to show the failure? Or if not, can you provide a basic
plug-in with a view that shows the problem?
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setBounds(10,10,200,200);
Button button = new Button(shell, SWT.PUSH);
button.setBounds(10,10,150,30);
button.setText("SWT Button");
Composite composite = new Composite(shell, SWT.EMBEDDED);
composite.setBounds(10,50,150,100);
java.awt.Frame fileTableFrame = SWT_AWT.new_Frame(composite);
java.awt.Panel panel = new java.awt.Panel(new java.awt.BorderLayout());
fileTableFrame.add(panel);
JTextField textField = new JTextField("JTextField");
panel.add(textField);
shell.open();
while(!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
display.dispose();
}
Grant
"Irum Godil" <irum@ca.ibm.com> wrote in message
news:hdcfbm$vjn$1@build.eclipse.org...
> Hi,
>
> I have a Swing JPanel, inside which I have a JTextField. The panel is
added to an Eclipse view. If I run the Swing application, I can easily enter
text into the JText field.
>
> But when inside the Eclipse view, I cannot even click inside the text
field.
>
> Does anyone know what is the solution to this.
>
> Thanks in advance,
> Irum.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03115 seconds