本文整理了Java中javax.swing.JFrame.setIgnoreRepaint()
方法的一些代码示例,展示了JFrame.setIgnoreRepaint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFrame.setIgnoreRepaint()
方法的具体详情如下:
包路径:javax.swing.JFrame
类名称:JFrame
方法名:setIgnoreRepaint
暂无
代码示例来源:origin: stackoverflow.com
public static void main (String [] args){
JFrame frame = new JFrame();
frame.setIgnoreRepaint(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setContentPane(new myPanel());
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
myPanel game = new myPanel();
game.start();
}
代码示例来源:origin: com.b3dgs.lionengine/lionengine-core-awt
/**
* Initialize the main frame.
*
* @return The created main frame.
* @throws LionEngineException If the engine has not been started.
*/
private JFrame initMainFrame()
{
final String title = getTitle();
final JFrame jframe = new JFrame(title, conf);
jframe.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
jframe.addWindowListener(new WindowAdapter()
{
@Override
public void windowClosing(WindowEvent event)
{
listeners.forEach(ScreenListener::notifyClosed);
}
});
jframe.setResizable(false);
jframe.setUndecorated(false);
jframe.setIgnoreRepaint(true);
return jframe;
}
代码示例来源:origin: stackoverflow.com
/*****************************************************************************
* @description: Creates window for program to run in, using appropriate DM
* @param DisplayMode dm
*/
public void setFullScreen(DisplayMode dm){
JFrame f = new JFrame();
f.setUndecorated(true); //no titlebars/scroll bars etc.
f.setIgnoreRepaint(true);
f.setResizable(false); //user cannot resize window
vc.setFullScreenWindow(f);
if(dm!=null && vc.isDisplayChangeSupported()){ //if DM is changeable
try {
vc.setDisplayMode(dm);
} catch (Exception e){/*Catch 'em all*/}
}
f.createBufferStrategy(2); //set # of screen buffers to 2
}//setFullScreen()
代码示例来源:origin: klamonte/jexer
/**
* Setup to render to an existing JFrame.
*/
public void setupFrame() {
frame.setTitle("Jexer Application");
frame.setBackground(Color.black);
frame.pack();
// Kill the X11 cursor
// Transparent 16 x 16 pixel cursor image.
BufferedImage cursorImg = new BufferedImage(16, 16,
BufferedImage.TYPE_INT_ARGB);
// Create a new blank cursor.
Cursor blankCursor = Toolkit.getDefaultToolkit().createCustomCursor(
cursorImg, new Point(0, 0), "blank cursor");
frame.setCursor(blankCursor);
// Be capable of seeing Tab / Shift-Tab
frame.setFocusTraversalKeysEnabled(false);
// Setup triple-buffering
if (tripleBuffer) {
frame.setIgnoreRepaint(true);
frame.createBufferStrategy(3);
}
}
代码示例来源:origin: stackoverflow.com
frame.setIgnoreRepaint(true);
frame.add(canvas);
frame.pack();
代码示例来源:origin: stackoverflow.com
frame.setIgnoreRepaint(true);
代码示例来源:origin: openimaj/openimaj
drawingFrame.addKeyListener(this);
drawingFrame.setIgnoreRepaint(true);
drawingFrame.setResizable(false);
代码示例来源:origin: org.openimaj/sandbox
drawingFrame.addKeyListener(this);
drawingFrame.setIgnoreRepaint(true);
drawingFrame.setResizable(false);
内容来源于网络,如有侵权,请联系作者删除!