List of usage examples for java.awt Panel Panel
public Panel(LayoutManager layout)
From source file:edu.harvard.i2b2.eclipse.plugins.admin.utilities.views.PatientCountView.java
private void audit() { //System.out.println(item.getText()+" item selected"); //group.setVisible(false); //composite1.setVisible(true); if (right != null && !right.isDisposed()) { right.dispose();//from www.j av a2s . com right = null; } right = new Composite(composite, SWT.NONE); GridLayout rightLayout1 = new GridLayout(); GridData rightLData = new GridData(); rightLData.grabExcessHorizontalSpace = true; rightLData.grabExcessVerticalSpace = true; rightLData.horizontalAlignment = GridData.FILL; rightLData.verticalAlignment = GridData.FILL; right.setLayoutData(rightLData); right.setLayout(rightLayout1); GridData composite1LData = new GridData(); composite1LData.grabExcessHorizontalSpace = true; composite1LData.grabExcessVerticalSpace = true; composite1LData.horizontalAlignment = GridData.FILL; composite1LData.verticalAlignment = GridData.FILL; composite1 = new Composite(right, SWT.EMBEDDED); composite1.setLayoutData(composite1LData); /* Create and setting up frame */ ////for mac fix //if ( System.getProperty("os.name").toLowerCase().startsWith("mac")) // SWT_AWT.embeddedFrameClass = "sun.lwawt.macosx.CViewEmbeddedFrame"; Frame runFrame = SWT_AWT.new_Frame(composite1); Panel runPanel = new Panel(new BorderLayout()); try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e1) { System.out.println("Error setting native LAF: " + e1); } runFrame.add(runPanel); JRootPane runRoot = new JRootPane(); runPanel.add(runRoot); java.awt.Container oAwtContainer = runRoot.getContentPane(); AdminToolMonitorJPanel runTreePanel = new AdminToolMonitorJPanel();//PatientMappingJPanel();//PreviousQueryPanel(this); //runTreePanel.setBackground(Color.BLUE); oAwtContainer.add(runTreePanel); //oAwtContainer.setVisible(true); //oAwtContainer.setSize(500, 500); //right.layout(true); //right.setVisible(true); //right.update(); composite.layout(true); //composite.setVisible(true); //composite.update(); }