List of usage examples for java.awt Frame validate
public void validate()
From source file:org.talend.dataprofiler.chart.util.ChartUtils.java
/** * Create a AWT_SWT bridge composite for displaying the <CODE>ChartPanel</CODE>. * //from ww w . j a v a 2 s . co m * @param composite * @param gd * @param chartPanel */ public static ChartPanel createAWTSWTComp(Composite composite, GridData gd, JFreeChart chart) { ChartPanel chartPanel = new ChartPanel(chart); Composite frameComp = new Composite(composite, SWT.EMBEDDED); frameComp.setLayout(new GridLayout()); frameComp.setLayoutData(gd); frameComp.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_GRAY)); Frame frame = SWT_AWT.new_Frame(frameComp); frame.setLayout(new java.awt.GridLayout()); frame.add(chartPanel); frame.validate(); return chartPanel; }
From source file:CustomAlphaTest.java
protected void addCanvas3D(Canvas3D c3d) { Frame frame = new Frame("Custom Alpha Test"); Panel aPanel = new Panel(); aPanel.setLayout(new BorderLayout()); aPanel.add(c3d, BorderLayout.CENTER); frame.add(aPanel);/*from ww w .j av a 2s . c om*/ frame.pack(); frame.setSize(new Dimension(320, 320)); frame.validate(); frame.setVisible(true); doLayout(); }
From source file:LightTest.java
protected void createLight(LightObject light, BranchGroup objRoot) { Frame frame = new Frame(light.getName()); Panel aPanel = new Panel(); frame.add(aPanel);/*w ww.ja va 2 s . co m*/ light.addUiToPanel(aPanel); frame.pack(); frame.setSize(new Dimension(400, 250)); frame.validate(); frame.setVisible(true); // add the geometry that depicts the light // to the scenegraph objRoot.addChild(light.createGeometry()); // finally add the light itself to the scenegraph objRoot.addChild(light.getLight()); }
From source file:SplineInterpolatorTest.java
public UiAlpha(Alpha alpha) { m_Alpha = alpha;/*from w w w . j a v a2 s . c o m*/ Frame frame = new Frame("Alpha Control Panel"); JPanel panel = new JPanel(); frame.add(panel); addUiToPanel(panel); frame.pack(); frame.setSize(new Dimension(400, 80)); frame.validate(); frame.setVisible(true); }