Community
Participate
Working Groups
I have a simple MultiPageEditor class that creates a page containing an AWT Panel. The panel does no refresh its background until the mouse enters the area. void createPage3() { Composite composite = new Composite(getContainer(), SWT.NONE); //code example composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL)); java.awt.Panel awtPanel = SWT_AWT.new_Panel(composite); // this is java swing panel in the composite. try { UIManager.setLookAndFeel (UIManager.getSystemLookAndFeelClassName()); } catch(Exception e){} java.awt.Button f2 = new java.awt.Button("d"); f2.setLocation(100,100); java.awt.Button f1=new java.awt.Button("Button"); awtPanel.setLayout(null); awtPanel.add(f1); f1.setLocation(100,100); f1.setSize(f1.getPreferredSize()); f1.setVisible(true); awtPanel.setBackground(java.awt.Color.red); int index = addPage(composite); setPageText(index, "Preview"); } When you use this page, the red background does not display until you move the mouse over the area. This works fine with JDK 1.3.1_03. Note that this also fails in JDK 1.4.1 RC1
This is a problem in the 1.4.1 VM and it appears to work in 1.4.2.