/** * Removes a component from the ActiveRender queue. This should happen when the component is closed. * * @param component the component to remove */ public static void removeActiveRender(final Component component) { // this should be on the EDT if (!EventQueue.isDispatchThread()) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { removeActiveRender(component); } }); return; } synchronized (activeRenders) { activeRenders.remove(component); final boolean hadActiveRenders = !activeRenders.isEmpty(); hasActiveRenders = hadActiveRenders; if (!hadActiveRenders) { activeRenderThread = null; } } component.setIgnoreRepaint(false); }
component.setIgnoreRepaint(true);
public static Component createGLCanvas(int width, int height, boolean useSwing) { GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL2)); Component canvas = useSwing ? new GLJPanel(caps) : new GLCanvas(caps); canvas.setSize(width, height); canvas.setIgnoreRepaint(true); canvas.setPreferredSize(new Dimension(width, height)); canvas.setSize(new Dimension(width, height)); return canvas; }
table = new JTable( model ); table.setPreferredScrollableViewportSize(table.getPreferredSize()); table.setIgnoreRepaint(false);
setIgnoreRepaint(true); frame.pack(); frame.setResizable(false);
canvas.setIgnoreRepaint(true); canvas.setFocusable(true); canvas.setIgnoreRepaint(true); canvas.setFocusable(true);
genPanel.add(terminateButton); lastOutput.setIgnoreRepaint(true); return genPanel;
gameField.setIgnoreRepaint(true); gameField.setPreferredSize(new Dimension(800, 580)); getContentPane().add(gameField, BorderLayout.CENTER);
canvas.setIgnoreRepaint(true);
menuBar.add(menu); setJMenuBar(menuBar); setIgnoreRepaint(true); setVisible(true);
full.setHorizontalAlignment(JTextField.CENTER); full.setText("FUELMeter"); full.setIgnoreRepaint(true); full.setFont(font2); full.setBorder(border2);
canvas.setIgnoreRepaint(true);
setIgnoreRepaint(true); t.start();
setIgnoreRepaint(true);//mustnt repaint itself the gameloop will do that setLayout(null); width = w;
mainFrame.setIgnoreRepaint(true); mainFrame.setVisible(true); mainFrame.setSize(640, 480);
mainFrame.setIgnoreRepaint(true); mainFrame.setVisible(true); mainFrame.setSize(640, 480);
frame.setIgnoreRepaint ( true ); frame.pack (); frame.createBufferStrategy ( 2 ); setIgnoreRepaint ( true ); Thread t = new Thread (){ @Override
mainFrame = new Frame(gc); mainFrame.setUndecorated(true); mainFrame.setIgnoreRepaint(true); device.setFullScreenWindow(mainFrame); if (device.isDisplayChangeSupported()) {
mainFrame = new Frame(gc); mainFrame.setUndecorated(true); mainFrame.setIgnoreRepaint(true); device.setFullScreenWindow(mainFrame); if (device.isDisplayChangeSupported()) {
obj.setIgnoreRepaint(ignoreRepaint);