Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

A JFrame is a component and top-level container of the JFC/Swing framework.

0
votes
1answer
52 views

Should I use Panels or Frames?

Hi I am creating my first game in NetBeans using Java, the game is going to be an RPG that will look a bit look Undertale on the surface in that there will be a menu, then a load game section and then ...
0
votes
1answer
87 views

JFrame pack() method

I'm quite new to java. I was developing a game using java and I realized that the position of pack() method can influence rendering. For instance: Frame Class ...
0
votes
0answers
16 views

Java Question about setLayout(null);

I'm new to the programming world and would like to learn from experienced teachers. How would I be able to add a picture to a JFrame and at the same time be able to add a panel So I could add buttons ...
0
votes
1answer
91 views

How do I split my screen to include a JFrame and a lwjgl screen

I a making a game and I'm going to make a little side GUI to create game items. How can I have a window both include a Canvas element and an lwjgl window.
0
votes
1answer
383 views

How to resize 2D Java game without “squeezing” it?

I am trying to make my second java game (2D) but i have run in a problem: The game will be in fullscreen, but how can i make it so it is scaled properly for each screen? While researching i found out ...
0
votes
1answer
286 views

Moving a tiled map in a jframe

I rendered a tiled map, with the help of slick2d, in my JFrame in Java. I can move my main character, but it is just that the character itself moves. I would like to do it that, if the player moves, ...
1
vote
1answer
2k views

Tile Maps in Java JFrame Game

I am making a 2D Java game with Java's own drawing library. I was wondering how I would make a tile map display on the screen. I would prefer to use a GUI application to make the maps. I'm looking for ...
0
votes
1answer
186 views

JFrame launcher stays open when I'm finished with it

I have written a launcher that prompts the user for their name then starts the game when they hit enter. The launcher looks like this: But when the user hits enter, this happens: The launcher stays ...
0
votes
1answer
2k views

Do you extend Java, to make games, or can you just use JFrame?

I'm starting to create my own side scroller, in Java. I think I've read that, when you create a game in Java, there is something you can extend your class with, like ...