How to create java window without a GUI - java

I have been given an assignment for uni to make a chess game without using a GUI(swing or Java FX)
I have made the game using the AWT Canvas Class. However, I cannot figure out how to actually make a java window or frame for the game to run in without using a GUI?
Thank you. Any help would be appreciated.

Related

Java application Swing drawing no Snake

I have programmed the game "Snake" in Java, but when I execute my program my snake does not appear. When I run my application, the game appears with writing, colors, and the apple the snake should eat. Just not the snake.
The program is here: https://github.com/ryanhillman/Colorful-Snake
This is what comes up when I run my program
Can anyone figure out what is causing my game to start incorrectly?
Thank you

How to take a screenshot in Java without AWT / Robot (entire screen)

I've seen the usual way of taking a screenshot in Java where you use a Robot and a BufferedImage to take a screenshot. But is there a way of doing this without using Robot and BufferedImage?
Why?
I am working with JavaFX and I don't like mixing up AWT (Swing) and JavaFX.
Not a big problem, I know, but I would love to keep everything within one library.
I've also heard that Robot is a bit slow, but that's not the main reason.
EDIT: I would like to capture the whole screen and not just an area like a scene.
Thanks in advance :D

Libgdx with Java Swing issue

I have a problem with libgdx. I want to use Screen from libgdx to draw game inside JPanel (from Swing, because my all app is written in Swing). I've tried, but I cannot do that.
Is it possible? Have you got any code examples?
Please for help and sorry for my english (just in case).
Here is a good solution:
https://stackoverflow.com/a/21258666
It uses LWJGLCanvas to embed libGDx inside a JPanel

Run second entry point from same java program in same or new process

For a school assignment I am making a desktop game in java. Using a game engine this would be easy enough the only problem is I have to use javaFX and since javaFX hijacks the the main entry-point of the application it would be nearly impossible to combine javaFX with a game engine like lets say LibGDX. So I was wondering would it be possible to run a second entry point from the first javaFX application with the game engine to be able to still use javaFX as a GUI?

Java swing gui and lwjgl

A simple question: Is it possible to view gui of java Swing library and lwjgl 3D scene in the same window without using any additional gui libraries? How?
You can use the method Display.setParent(java.awt.Canvas) to put the LWJGL display on a canvas. You can then incorporate this canvas into your Swing GUI. Please note that there may be slight performance issues with said approach.

Categories

Resources