APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.backends.lwjgl

public Class LwjglAWTFrame

extends JFrame
Class Inheritance
Imports
com.badlogic.gdx.ApplicationListener, java.awt.Dimension, javax.swing.JFrame

Wraps an LwjglAWTCanvas in a resizable JFrame.

Field Summary

Modifier and TypeField and Description
pack-priv final LwjglAWTCanvas
private Thread
Inherited from javax.swing.JFrame:
accessibleContextrootPanerootPaneCheckingEnabled

Constructor Summary

AccessConstructor and Description
public
LwjglAWTFrame(ApplicationListener listener, String title, int width, int height)

Method Summary

Modifier and TypeMethod and Description
public LwjglAWTCanvas
protected void
initialize()

Called before the JFrame is shown.

public void
setHaltOnShutdown(boolean halt)

When true, Runtime.getRuntime().halt(0); is used when the JVM shuts down.

protected void
start()

Called after ApplicationListener create and resize, but before the game loop iteration.

public void
updateSize(int width, int height)

Called when the canvas size changes.

Inherited from javax.swing.JFrame:
addImplcreateRootPaneframeInitgetAccessibleContextgetContentPanegetDefaultCloseOperationgetGlassPanegetGraphicsgetJMenuBargetLayeredPanegetRootPanegetTransferHandlerisDefaultLookAndFeelDecoratedisRootPaneCheckingEnabledparamStringprocessWindowEventremoverepaintsetContentPanesetDefaultCloseOperationsetDefaultLookAndFeelDecoratedsetGlassPanesetIconImagesetJMenuBarsetLayeredPanesetLayoutsetRootPanesetRootPaneCheckingEnabledsetTransferHandlerupdate

Field Detail

lwjglAWTCanvasback to summary
pack-priv final LwjglAWTCanvas lwjglAWTCanvas
shutdownHookback to summary
private Thread shutdownHook

Constructor Detail

LwjglAWTFrameback to summary
public LwjglAWTFrame(ApplicationListener listener, String title, int width, int height)

Method Detail

getLwjglAWTCanvasback to summary
public LwjglAWTCanvas getLwjglAWTCanvas()
initializeback to summary
protected void initialize()

Called before the JFrame is shown.

setHaltOnShutdownback to summary
public void setHaltOnShutdown(boolean halt)

When true, Runtime.getRuntime().halt(0); is used when the JVM shuts down. This prevents Swing shutdown hooks from causing a deadlock and keeping the JVM alive indefinitely. Default is true.

startback to summary
protected void start()

Called after ApplicationListener create and resize, but before the game loop iteration.

updateSizeback to summary
public void updateSize(int width, int height)

Called when the canvas size changes.